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.
Blinking_Leds_Forloop.cpp
00001 #include "mbed.h" 00002 #include "C12832.h" 00003 00004 DigitalIn pushButton(p9); 00005 C12832 lcd(SPI_MOSI,SPI_SCK,SPI_MISO,p8,p10); 00006 00007 void display(char *lcdPrint){ 00008 lcd.cls(); 00009 lcd.printf(lcdPrint); 00010 lcd.locate(3,5); 00011 00012 } 00013 00014 int main(){ 00015 while(1){ 00016 int i; 00017 if(pushButton==1){ 00018 DigitalOut led(p5); 00019 for(i=0;i<3;i++){ 00020 led = 0; 00021 display("LED Blinking1"); 00022 wait(2); 00023 led=1; 00024 wait(2); 00025 } 00026 led=0; 00027 wait(1); 00028 } 00029 } 00030 00031 }
Generated on Wed Jul 27 2022 03:38:40 by
1.7.2