Michael Limbird / Mbed 2 deprecated VideoOutput

Dependencies:   mbed

Committer:
mlimbird
Date:
Mon Jan 12 13:47:19 2015 +0000
Revision:
24:e8fd339db02e
Parent:
23:0baaa24e04d8
Just making sure everything is up to date.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mlimbird 0:80725699690f 1 #include "mbed.h"
m-limbird 22:dbd5c4af83d6 2 #include "9DOF.h"
mlimbird 8:c64f76d4deff 3
mlimbird 20:03a3357de805 4 //establish I2C connections
m-limbird 22:dbd5c4af83d6 5 I2C i2c( p9, p10 );
mlimbird 8:c64f76d4deff 6
mlimbird 20:03a3357de805 7 //establish serial communications with computer via usb
mlimbird 8:c64f76d4deff 8 Serial pc(USBTX, USBRX); //tx, rx
mlimbird 8:c64f76d4deff 9
mlimbird 20:03a3357de805 10 //arrays to store data from 9DOF
mlimbird 12:509ed716bd58 11 int accelerometer_data[3];
mlimbird 16:1121b66ef27b 12 int gyro_data[3];
mlimbird 19:76632ff3e9fc 13 int magnetometer_data[3];
mlimbird 8:c64f76d4deff 14
mlimbird 0:80725699690f 15 int main() {
mlimbird 8:c64f76d4deff 16
mlimbird 20:03a3357de805 17 //initialize each IC
mlimbird 23:0baaa24e04d8 18 init_adxl345(i2c);
m-limbird 22:dbd5c4af83d6 19 init_itg3200(i2c);
mlimbird 23:0baaa24e04d8 20 init_hmc5883(i2c);
mlimbird 9:331dbf3b341d 21
mlimbird 12:509ed716bd58 22 while(1) {
mlimbird 20:03a3357de805 23 //read from each IC
mlimbird 23:0baaa24e04d8 24 read_adxl345(i2c, accelerometer_data);
mlimbird 24:e8fd339db02e 25 pc.printf("ACCEL: %i\t%i\t%i\n", accelerometer_data[0], accelerometer_data[1], accelerometer_data[2]);
m-limbird 22:dbd5c4af83d6 26 read_itg3200(i2c, gyro_data);
mlimbird 24:e8fd339db02e 27 pc.printf("GYRO: %i\t%i\t%i\n", gyro_data[0], gyro_data[1], gyro_data[2]);
mlimbird 23:0baaa24e04d8 28 read_hmc5883(i2c, magnetometer_data);
mlimbird 24:e8fd339db02e 29 pc.printf("Magnet: %i\t%i\t%i\n", magnetometer_data[0], magnetometer_data[1], magnetometer_data[2]);
mlimbird 0:80725699690f 30 }
mlimbird 19:76632ff3e9fc 31 }