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)

Dependencies:   mbed

Committer:
agiembed
Date:
Thu Aug 12 01:08:40 2010 +0000
Revision:
0:bd282c11d296

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
agiembed 0:bd282c11d296 1 I2C i2c(p9, p10); //sda, scl
agiembed 0:bd282c11d296 2
agiembed 0:bd282c11d296 3 const int addr = 0x50; // define the I2C Address
agiembed 0:bd282c11d296 4 char bl_F[2], bl_B[2], bl_L[2], bl_R[2];
agiembed 0:bd282c11d296 5
agiembed 0:bd282c11d296 6 void eyetosee(){
agiembed 0:bd282c11d296 7
agiembed 0:bd282c11d296 8 bl_F[1]= 0;
agiembed 0:bd282c11d296 9 bl_B[1]= 0;
agiembed 0:bd282c11d296 10
agiembed 0:bd282c11d296 11 i2c.write(addr+2, bl_L, 2); // Send command string to Motor Left
agiembed 0:bd282c11d296 12 i2c.write(addr+4, bl_B, 2); // Send command string to Motor Back
agiembed 0:bd282c11d296 13 i2c.write(addr+6, bl_F, 2); // Send command string to Motor Front
agiembed 0:bd282c11d296 14 i2c.write(addr+8, bl_R, 2); // Send command string to Motor Right
agiembed 0:bd282c11d296 15
agiembed 0:bd282c11d296 16 }