1st attempt

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
slackerjacker
Date:
Thu Nov 26 14:01:56 2020 +0000
Parent:
1:03c191369089
Commit message:
Knight Rider first attempt

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 03c191369089 -r 6baade9068fe main.cpp
--- a/main.cpp	Sun Jan 01 20:57:57 2012 +0000
+++ b/main.cpp	Thu Nov 26 14:01:56 2020 +0000
@@ -1,12 +1,53 @@
 #include "mbed.h"
-
-DigitalOut myled(LED1);
-
+///////////////////////////////////
+///////Knight rider//////////////// 
+///////Jack Hanlon 26/11/20////////
+//////////////////////////////////
+DigitalOut led1(LED1);
+DigitalOut led2(LED2);
+DigitalOut led3(LED3);
+DigitalOut led4(LED4);
 int main() {
     while(1) {
-        myled = 1;
-        wait(0.2);
-        myled = 0;
-        wait(0.2);
+        led1= 1;
+        wait(.5);
+        led1=0;
+        wait(.1);
+        led2=1;
+        wait(.5);
+        led2=0;
+        wait(.1);
+        led3 =1;
+        wait(.5);
+        led3=0;
+        wait(.1);
+        led4=1;
+        wait(.5);
+        led4=0;
+        wait(.5);
+///////////////////////////
+//ligts forward///////////
+/////////////////////////
+        led4= 1;
+        wait(.5);
+        led4=0;
+        wait(.1);
+        led3=1;
+        wait(.5);
+        led3=0;
+        wait(.1);
+        led2=1;
+        wait(.5);
+        led2=0;
+        wait(.1);
+        led1=1;
+        wait(.5);
+        led1=0;
+        wait(.5);
+/////////////////////////
+//lights backward///////
+///////////////////////
+        
+        
     }
 }
diff -r 03c191369089 -r 6baade9068fe mbed.bld
--- a/mbed.bld	Sun Jan 01 20:57:57 2012 +0000
+++ b/mbed.bld	Thu Nov 26 14:01:56 2020 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/078e4b97a13e
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file