imu rev1
Fork of AIviate by
steps.cpp
- Committer:
- teamgoat
- Date:
- 2013-11-01
- Revision:
- 2:452dd766d212
- Parent:
- 0:0c627ff4c5ed
- Child:
- 3:f9e18a9cd9af
File content as of revision 2:452dd766d212:
#include "steps.h" Serial pc(USBTX, USBRX); // in the future, change get_sensor_data to append the sensor data to a rolling list void get_sensor_data() { struct sensor s; if (read_accelerometer(&s) == 0) { pc.printf("Error in get_sensor_data while reading from accel!\r\n"); return; } pc.printf("Ax: %i Ay: %i Az: %i;\r\n", s.ax, s.ay, s.az); return; } void init_sensors() { // create config struct struct config c; // set configurations c.frequency = 10000; // pass configuration struct to configuration routine int ret = config_gy80(&c); if (ret == 0) { pc.printf("Error configuring sensors\r\n"); } }