Gabriel Karerangabo / Mbed 2 deprecated Blinking_LEDSAlternatively

Dependencies:   mbed

Revision:
4:f4fcecf27b0e
diff -r 52ee0dc27542 -r f4fcecf27b0e Blinking_Leds_Forloop.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Blinking_Leds_Forloop.cpp	Wed Jun 02 16:03:20 2021 +0000
@@ -0,0 +1,31 @@
+#include "mbed.h"
+#include "C12832.h"
+
+DigitalIn pushButton(p9);
+C12832 lcd(SPI_MOSI,SPI_SCK,SPI_MISO,p8,p10);
+
+void display(char *lcdPrint){
+    lcd.cls();
+    lcd.printf(lcdPrint);
+    lcd.locate(3,5);
+    
+}
+
+int main(){
+     while(1){
+         int i;
+         if(pushButton==1){
+             DigitalOut led(p5);
+             for(i=0;i<3;i++){
+                 led = 0;
+                 display("LED Blinking1");
+                 wait(2);
+                 led=1;
+                 wait(2);
+                 }
+                 led=0;
+                 wait(1);
+                 }
+     }
+    
+}
\ No newline at end of file