A system to help you ride your bike better than you do right now.
Dependencies: 4DGL-uLCD-SE SDFileSystem mbed LSM9DS1_Library_cal
Diff: main.cpp
- Revision:
- 5:436b39863099
- Parent:
- 4:1928bf053958
- Child:
- 6:45a5043acc7e
diff -r 1928bf053958 -r 436b39863099 main.cpp --- a/main.cpp Sun Dec 04 23:03:37 2016 +0000 +++ b/main.cpp Mon Dec 05 00:42:57 2016 +0000 @@ -66,7 +66,7 @@ lcd.printf("Time : %1.1f\n\n", (float)seconds / 3600); // light states code - lightstates = get_state(); + // lightstates = get_state(); } // store this trip @@ -165,8 +165,8 @@ // interrupt, performed when the hallsensor passes the magnet stopped = 0; // reset the global hallT.stop(); - speed = 0.00136364 / (t.read() / 3600); // current speed + speed = 0.00136364 / (hallT.read() / 3600); // current speed miles += 0.00136364; // circumference of the tire in miles - t.reset(); - t.start(); + hallT.reset(); + hallT.start(); } \ No newline at end of file