Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: Blinking_Leds_Forloop.cpp
- Revision:
- 4:f4fcecf27b0e
--- /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