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.
Dependencies: mbed
main.cpp
00001 #include "mbed.h" 00002 00003 BusOut led(LED1,LED2,LED3,LED4); 00004 BusIn jst (p12,p13,p14,p15,p16); 00005 00006 00007 int main() { 00008 00009 led = 0x0; 00010 00011 00012 00013 while (1) { 00014 00015 if(jst & 0x2){ 00016 00017 led = 0xF; 00018 00019 for(int i=0;i<4;i++){ 00020 00021 led = led<<1; 00022 00023 wait_ms(200); 00024 } 00025 } 00026 00027 if(jst & 0x10){ 00028 00029 led = 0x0; 00030 00031 for(int i=0;i<4;i++){ 00032 00033 led = (led>>1) | 0x8; 00034 00035 wait_ms(100); 00036 } 00037 } 00038 00039 00040 00041 00042 00043 } 00044 00045 return 0; 00046 }
Generated on Thu Aug 4 2022 20:27:38 by
1.7.2