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 DigitalOut led1(LED1); 00004 DigitalOut led2(LED2); 00005 DigitalOut led3(LED3); 00006 00007 int main() 00008 { 00009 int counter = 0; 00010 while(1) { 00011 // Compute the bin array 00012 int a[8]; 00013 int pos = 7; 00014 for (int i = 1; i <= 64; i *= 2) { 00015 a[pos] = counter & i; 00016 pos--; 00017 } 00018 00019 // Assign the values 00020 led1 = a[7]; 00021 led2 = a[6]; 00022 led3 = a[5]; 00023 00024 wait(0.4); 00025 00026 counter++; 00027 } 00028 }
Generated on Sat Aug 27 2022 23:25:47 by
1.7.2