//pulse action action pulse() | arduino -> pin mode(7, arduino - > INPUT) | var bit := arduino -> digital read(7) | var init_time:=arduino->millis(); | var beats:=0; | var prev_bit:=0; | while arduino->millis()-init_time<60000 | | bit := arduino -> digital read(7) | | if bit=600 and bit | | | beats:=beats+1 | | | engduino->set all LEDs (colors -> white) | | | engduino->delay (50) | | | engduino->set all LEDs (colors -> black) | | else do nothing end if | | bit->post to wall | | prev_bit:=bit | end while | “heart rate"->post to wall | “Your heartrate is of ” -> concat(bit - > to string) -> concat(“ bpm”) -> post to wall | if(beats > 100) then | | “Your heartrate is faster than the recommended range. You might be experiencing a case of Tachycardia. We strongly suggest getting a doctor’s opinion.” -> post to wall | | engduino -> set all LEDs (colors -> magenta) | else if (beats >= 60) then | | “Congratulations! Your heartrate appears to be within the recommended bounds.” -> post to wall | | Engduino -> set all LEDs (colors -> blue) | else “Your heartrate is slower than the recommended range. You might be experiencing a case of Bradycardia. We strongly suggest getting a doctor’s opinion.” -> post to wall | |Engduino -> set all LEDs (colors -> red) | end if end action