move the motors or do nothing depending on how long the muscle is tense

Dependencies:   mbed

Committer:
NickDGreg
Date:
Mon Oct 19 08:54:18 2015 +0000
Revision:
0:82d3afcdfbb5
update function to do nothing or to move motor and reset count for how long muscle is under tension

Who changed what in which revision?

UserRevisionLine numberNew contents of line
NickDGreg 0:82d3afcdfbb5 1 #include "mbed.h"
NickDGreg 0:82d3afcdfbb5 2
NickDGreg 0:82d3afcdfbb5 3 DigitalOut gpo(D0);
NickDGreg 0:82d3afcdfbb5 4 DigitalOut led(LED_RED);
NickDGreg 0:82d3afcdfbb5 5
NickDGreg 0:82d3afcdfbb5 6 int main()
NickDGreg 0:82d3afcdfbb5 7 {
NickDGreg 0:82d3afcdfbb5 8 while (true) {
NickDGreg 0:82d3afcdfbb5 9 gpo = !gpo; // toggle pin
NickDGreg 0:82d3afcdfbb5 10 led = !led; // toggle led
NickDGreg 0:82d3afcdfbb5 11 wait(0.2f);
NickDGreg 0:82d3afcdfbb5 12 }
NickDGreg 0:82d3afcdfbb5 13 }