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 //LEDs indicate a number as binary numeral system and the number is increasing with 0.2sec intervals. 00002 //by Kohei Matsumura 00003 00004 #include "mbed.h" 00005 00006 DigitalOut led1(LED1); 00007 DigitalOut led2(LED2); 00008 DigitalOut led3(LED3); 00009 DigitalOut led4(LED4); 00010 00011 int main() { 00012 int i=0; 00013 00014 while(1) { 00015 wait(0.2); 00016 led1 = i & 0x01; 00017 led2 = i>>1 & 0x01; 00018 led3 = i>>2 & 0x01; 00019 led4 = i>>3 & 0x01; 00020 00021 if(i>0x0f){ 00022 i=0; 00023 }else{ 00024 i++; 00025 } 00026 } 00027 }
Generated on Sun Sep 4 2022 15:32:22 by
1.7.2