after pressing button ten times led will light up

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
jakebonney10
Date:
Thu Oct 05 23:53:50 2017 +0000
Parent:
0:7a1c2b296ffe
Commit message:
OCE 360 Assignment 1

Changed in this revision

counter_2.cpp Show diff for this revision Revisions of this file
--- a/counter_2.cpp	Wed Oct 04 21:45:58 2017 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-#include "mbed.h"
-
-//Jake Bonney
-//OCE 360
-//Assignment 1
-//After a button is pressed 10 times have an LED light up
-
-DigitalOut myled1(LED1);
-DigitalIn button(p7);
-SwitchIn ??????/
-
-int main() {
-    while(1){
-        if (button==0){
-            if(switchin==1){
-            counter = counter + 1;
-            button=1;}
-        end}
-    else{
-        if (switchin==0)
-            button=0
-        end{
-        if (counter>=10)
-        myled1=1;
-        wait(0.1);
-        }
-        
-}