
Read IMU data at Serial port (p28, p27), data rate <100Hz @115200bps Read 5 channels PPM signal at p11 using InterruptIn Send data via RF Modem at serial port (p13, p14) in 36Hz @115200 Drive i2C motor speed controller at I2C port (p9, p10) in every 10mS (control loop delay time)
Diff: i2C.h
- Revision:
- 0:7ccd56e1c3b1
diff -r 000000000000 -r 7ccd56e1c3b1 i2C.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/i2C.h Wed Aug 11 01:23:42 2010 +0000 @@ -0,0 +1,18 @@ +I2C i2c(p9, p10); //sda, scl + +const int addr = 0x50; // define the I2C Address +char bl_F[2], bl_B[2], bl_L[2], bl_R[2]; + +void eyetosee(){ + + bl_F[1]= 0; + bl_B[1]= 0; + bl_R[1]= 0; + bl_L[1]= 9; + + i2c.write(addr+2, bl_L, 2); // Send command string to Motor Left + i2c.write(addr+4, bl_B, 2); // Send command string to Motor Back + i2c.write(addr+6, bl_F, 2); // Send command string to Motor Front + i2c.write(addr+8, bl_R, 2); // Send command string to Motor Right + +} \ No newline at end of file