the fish that looks like a jet

Dependencies:   ADXL345 ADXL345_I2C IMUfilter ITG3200 mbed Servo

Committer:
rkk
Date:
Tue Jan 21 23:47:08 2014 +0000
Revision:
1:80e0af42f876
Parent:
0:ff9bc5f69c57
Child:
3:666c1bae1a34
comment added

Who changed what in which revision?

UserRevisionLine numberNew contents of line
sandwich 0:ff9bc5f69c57 1 #include "mbed.h"
sandwich 0:ff9bc5f69c57 2 #include "motor_controller.h"
sandwich 0:ff9bc5f69c57 3 #include "IMU.h"
sandwich 0:ff9bc5f69c57 4
sandwich 0:ff9bc5f69c57 5 PololuMController mcon(p22, p6, p5);
sandwich 0:ff9bc5f69c57 6 IMU imu(0.1, 0.3, 0.005, 0.005);
sandwich 0:ff9bc5f69c57 7
rkk 1:80e0af42f876 8 //main()
sandwich 0:ff9bc5f69c57 9 int main() {
sandwich 0:ff9bc5f69c57 10 Timer t;
sandwich 0:ff9bc5f69c57 11 t.start();
sandwich 0:ff9bc5f69c57 12 while(1) {
sandwich 0:ff9bc5f69c57 13 /* if (speed>=1)
sandwich 0:ff9bc5f69c57 14 {
sandwich 0:ff9bc5f69c57 15 speed=0;
sandwich 0:ff9bc5f69c57 16 mcon.reverse();
sandwich 0:ff9bc5f69c57 17 }
sandwich 0:ff9bc5f69c57 18 mcon.setspeed(speed);
sandwich 0:ff9bc5f69c57 19 */
sandwich 0:ff9bc5f69c57 20 mcon.drive_sinusoidal(t.read(), 1, 0.25*3.14, 0);
sandwich 0:ff9bc5f69c57 21 wait(0.2);
sandwich 0:ff9bc5f69c57 22 }
sandwich 0:ff9bc5f69c57 23 t.stop();
sandwich 0:ff9bc5f69c57 24 }