reeeeeeeeeeeeeee
Dependencies: MotionSensor mbed
Fork of Assignment2_ver3 by
main.cpp@9:751e39d24c39, 2016-11-29 (annotated)
- Committer:
- weebgrammers
- Date:
- Tue Nov 29 22:06:14 2016 +0000
- Revision:
- 9:751e39d24c39
- Parent:
- 7:6dc42e1a2a81
r
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
simon | 0:fb6bbc10ffa0 | 1 | #include "mbed.h" |
Judorunner | 2:e2ae43e8acab | 2 | #include "PaceHeart.h" |
weebgrammers | 7:6dc42e1a2a81 | 3 | #include "Hardware.h" |
weebgrammers | 9:751e39d24c39 | 4 | #include "motion.h" |
oopakhooo | 3:641eefd1110b | 5 | //DigitalOut output_pin_A(LED1); |
simon | 0:fb6bbc10ffa0 | 6 | |
oopakhooo | 4:f0a11480f39f | 7 | PaceHeart* Pacer = new PaceHeart; |
weebgrammers | 9:751e39d24c39 | 8 | |
oopakhooo | 4:f0a11480f39f | 9 | DigitalOut led(LED1); |
weebgrammers | 7:6dc42e1a2a81 | 10 | Serial pc(USBTX, USBRX); |
weebgrammers | 7:6dc42e1a2a81 | 11 | void setup() { |
weebgrammers | 7:6dc42e1a2a81 | 12 | pc.baud(57600); |
oopakhooo | 4:f0a11480f39f | 13 | } |
oopakhooo | 4:f0a11480f39f | 14 | |
Judorunner | 2:e2ae43e8acab | 15 | |
simon | 0:fb6bbc10ffa0 | 16 | int main() { |
weebgrammers | 7:6dc42e1a2a81 | 17 | setup(); |
weebgrammers | 9:751e39d24c39 | 18 | initialize_motion (); |
weebgrammers | 7:6dc42e1a2a81 | 19 | while(1){ |
weebgrammers | 9:751e39d24c39 | 20 | |
weebgrammers | 9:751e39d24c39 | 21 | Pacer->pace_V(); |
weebgrammers | 9:751e39d24c39 | 22 | //motionThread.start(motion_thread); |
weebgrammers | 9:751e39d24c39 | 23 | motion_thread(*Pacer); |
weebgrammers | 7:6dc42e1a2a81 | 24 | //Check_serial(pc,*Pacer); |
weebgrammers | 7:6dc42e1a2a81 | 25 | } |
weebgrammers | 7:6dc42e1a2a81 | 26 | //Pacer-> pace_A(); |
simon | 0:fb6bbc10ffa0 | 27 | } |