My modifications/additions to the code
Dependencies: ADXL345 ADXL345_I2C IMUfilter ITG3200 Servo fishgait mbed-rtos mbed pixy_cam
Fork of robotic_fish_ver_4_8 by
Diff: motor_controller.h
- Revision:
- 8:0574a5db1fc4
- Parent:
- 7:e005cfaff8d1
- Child:
- 10:d9f1037f0cb0
--- a/motor_controller.h Thu Jan 30 02:04:23 2014 +0000 +++ b/motor_controller.h Fri Jan 31 04:33:44 2014 +0000 @@ -13,6 +13,11 @@ DigitalOut* outA; DigitalOut* outB; float timestamp; + + //for driving + float phi1, ome1,amp1; + + public: PololuMController(); PololuMController(PinName pwmport, PinName A, PinName B); @@ -20,6 +25,6 @@ void setspeed(float speed); //0 to 1 void setpolarspeed(float speed); //-1 to 1 void reverse(); //only works on non-polar speed - void drive_sinusoidal(float currentTime, float dutyCycle, float frequency); + void drive_sinusoidal(float currentTime, float amplitude, float frequency); void drive_rectangular(float currentTime, float amplitude, float frequency); }; \ No newline at end of file