imu rev1

Dependencies:   IMUfilter mbed

Fork of AIviate by UCLA IEEE

Committer:
teamgoat
Date:
Wed Oct 30 02:31:43 2013 +0000
Revision:
0:0c627ff4c5ed
Child:
2:452dd766d212
First compiled version (reads sensors, I think)

Who changed what in which revision?

UserRevisionLine numberNew contents of line
teamgoat 0:0c627ff4c5ed 1 #include "steps.h"
teamgoat 0:0c627ff4c5ed 2
teamgoat 0:0c627ff4c5ed 3 Serial pc(USBTX, USBRX);
teamgoat 0:0c627ff4c5ed 4
teamgoat 0:0c627ff4c5ed 5 // in the future, change get_sensor_data to append the sensor data to a rolling list
teamgoat 0:0c627ff4c5ed 6 void get_sensor_data()
teamgoat 0:0c627ff4c5ed 7 {
teamgoat 0:0c627ff4c5ed 8 struct accel s;
teamgoat 0:0c627ff4c5ed 9 if (read_accelerometer(&s) == 0)
teamgoat 0:0c627ff4c5ed 10 {
teamgoat 0:0c627ff4c5ed 11 pc.printf("Error!");
teamgoat 0:0c627ff4c5ed 12 return;
teamgoat 0:0c627ff4c5ed 13 }
teamgoat 0:0c627ff4c5ed 14 pc.printf("Ax: %i Ay: %i Az: %i\n", s.ax, s.ay, s.az);
teamgoat 0:0c627ff4c5ed 15 return;
teamgoat 0:0c627ff4c5ed 16 }