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.
main.cpp
00001 #include "mbed.h" 00002 #include "platform/mbed_thread.h" 00003 #include "RPinName.h" 00004 00005 // Blinking rate in milliseconds 00006 #define loopdelay 1000 00007 #define betweenleds 500 00008 00009 00010 int main() 00011 { 00012 00013 // Initialise the digital pins for LEDs as an output 00014 DigitalOut ledg(led1); // WiFi or same as LED1 00015 DigitalOut ledb(led2); // Azure 00016 DigitalOut ledy(led3); // User 00017 00018 DigitalIn PushButtonA(Key2); 00019 DigitalIn PushButtonB(Key3); 00020 00021 // Initialise the pulse-width-moudulation for RGB LED 00022 PwmOut RGBR(RedRGB); 00023 PwmOut RGBG(GreenRGB); 00024 PwmOut RGBB(BlueRGB); 00025 00026 Serial AZ(tx, rx); // tx, rx 00027 00028 PushButtonA.mode(PullUp); 00029 PushButtonB.mode(PullUp); 00030 00031 while(1) { 00032 ledg = !PushButtonA; 00033 ledb = !PushButtonB; 00034 } 00035 }
Generated on Fri Oct 28 2022 16:37:29 by
1.7.2