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 00003 #define LED_MASK 0x00000038 //bits 3, 4, 5 00004 #define RED_MASK 0x00000008 //bit 3 (D3): LED_RED 00005 #define GREEN_MASK 0x00000010 //bit 5 (D4): LED_GREEN 00006 #define BLUE_MASK 0x00000020 //bit 4 (D5): LED_BLUE 00007 00008 PortOut ledport(PortB, LED_MASK); 00009 00010 int main() 00011 { 00012 while(1) { 00013 ledport = RED_MASK; 00014 wait(0.5); 00015 ledport = GREEN_MASK; 00016 wait(0.5); 00017 ledport = BLUE_MASK; 00018 wait(0.5); 00019 ledport = LED_MASK; 00020 wait(0.5); 00021 } 00022 }
Generated on Sat Jul 30 2022 09:33:07 by
1.7.2