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 DigitalInOut BK(D8, PIN_OUTPUT, OpenDrain, 1); 00004 DigitalInOut B(D9, PIN_OUTPUT, OpenDrain, 1); 00005 DigitalInOut W(D10, PIN_OUTPUT, OpenDrain, 1); 00006 DigitalInOut Y(D11, PIN_OUTPUT, OpenDrain, 1); 00007 DigitalInOut G(D12, PIN_OUTPUT, OpenDrain, 1); 00008 DigitalInOut R(D13, PIN_OUTPUT, OpenDrain, 1); 00009 00010 int main() 00011 { 00012 00013 while(1) { 00014 00015 BK = 1; // LED is ON 00016 B = 1; // LED is ON 00017 W = 1; // LED is ON 00018 Y = 1; // LED is ON 00019 G = 1; // LED is ON 00020 R = 1; // LED is ON 00021 wait(5.0); // 1 sec 00022 00023 BK = 0; // LED is ON 00024 B = 0; // LED is ON 00025 W = 0; // LED is ON 00026 Y = 0; // LED is ON 00027 G = 0; // LED is ON 00028 R = 0; // LED is ON 00029 wait(5.0); // 1 sec 00030 00031 } 00032 }
Generated on Sun Jul 17 2022 13:18:05 by
