![](/media/cache/profiles/DSC_0020.jpg.50x50_q85.jpg)
a pacemaker
Diff: main.cpp
- Revision:
- 3:334300ac49e5
- Parent:
- 2:ab8469051a2d
--- a/main.cpp Wed Oct 26 14:04:14 2016 +0000 +++ b/main.cpp Wed Oct 26 18:20:43 2016 +0000 @@ -8,18 +8,23 @@ ledb = 0; pc.printf("connecting..."); pc.printf("\n\n"); + start_clock(); wait(3); ledb = 1; wait(1); - start_clock(); while (true) { - pc.printf("%d" , get_time()); + pc.printf("%2.4f" , get_time()); pc.printf("\n"); - ledg = 0; - v_pace_sq(5 , 0.08); - ledg = 1; - pc.printf("%d" , get_time()); - pc.printf("\n"); + set_ventricle_logic(1); + while (true){ + v_pace_sq(34.2 , 0.08); + ledg = 0; + if (get_ventricle_logic() == 0){ + ledg = 1; + break; + } + wait(0.01); + } wait(0.92); } } \ No newline at end of file