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.
Dependencies: mbed wave_player mbed-rtos 4DGL-uLCD-SE SDFileSystem X_NUCLEO_53L0A1 HC_SR04_Ultrasonic_Library
part3.h
00001 #include "mbed.h" 00002 00003 DigitalOut led1(LED1); 00004 DigitalOut led2(LED2); 00005 DigitalOut led3(LED3); 00006 DigitalOut led4(LED4); 00007 00008 Ticker ticker1; 00009 Ticker ticker2; 00010 Ticker ticker3; 00011 Ticker ticker4; 00012 00013 void flipLED1() { 00014 led1 = !led1; 00015 } 00016 00017 void flipLED2() { 00018 led2 = !led2; 00019 } 00020 00021 void flipLED3() { 00022 led3 = !led3; 00023 } 00024 00025 void flipLED4() { 00026 led4 = !led4; 00027 } 00028 00029 void run_part3() { 00030 led1 = 0; 00031 led2 = 0; 00032 led3 = 0; 00033 led4 = 0; 00034 00035 ticker1.attach(&flipLED1, 1.0); 00036 ticker2.attach(&flipLED2, 2.0); 00037 ticker3.attach(&flipLED3, 4.0); 00038 ticker4.attach(&flipLED4, 8.0); 00039 00040 while(1); 00041 } 00042
Generated on Wed Jul 13 2022 11:06:00 by
 1.7.2
 1.7.2