#include #include int main() { DPPTU dpptu("/dev/ttyS0"); if (!dpptu.open_status()) { cerr << "Uh oh." << endl; exit(1); } dpptu.pan_to(0.0); dpptu.tilt_to(0.0); dpptu.await(); cerr << "At the origin" << endl; dpptu.pan_by(-30.0); dpptu.tilt_by(-15.0); dpptu.await(); //if (dpptu.is_moving()) cerr << "Pan-tilt unit is moving!" << endl; //dpptu.await(); //if (dpptu.is_moving()) cerr << "Is moving!" << endl; dpptu.pan_by(60.0); dpptu.tilt_by(15.0); dpptu.await(); //if (dpptu.is_moving()) cerr << "Is moving!" << endl; //dpptu.await(); //dpptu.await(); dpptu.tilt_by(15.0); //dpptu.await(); dpptu.tilt_by(-15.0); dpptu.await(); dpptu.tilt_to(0.0); dpptu.pan_to(0.0); return(0); }