Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: MPU9150_DMP MotorControl QuaternionMath SimpleIOMacros mbed
Fork of cool_step_new by
Diff: main.cpp
- Revision:
- 6:3bd16fdf0b6e
- Parent:
- 5:3953111e9476
- Child:
- 7:7f9abf427b06
--- a/main.cpp Mon Apr 20 14:49:36 2015 +0000
+++ b/main.cpp Tue Apr 21 07:30:19 2015 +0000
@@ -25,14 +25,13 @@
{
led1=!led1;
printf("%d\r\n",timer2.read_us());
- timer2.reset();
}
int main()
{
RN42.baud(9600);
debug.baud(115200);
-
+
infoTicker.attach(infoTask,0.2f);
if(imu.isReady()) {
@@ -51,10 +50,11 @@
Quaternion q1;
while(1) {
-
+
if(imu.getFifoCount() >= 48) {
imu.getFifoBuffer(buffer, 48);
led2 = !led2;
+ timer2.reset();
}
if(timer.read_ms() > 100) {
