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 DigitalIn ButtonUp(p5,PullUp); 00003 DigitalIn ButtonDown(p6,PullUp); 00004 PwmOut led(p26); 00005 int val=0; 00006 int main() { 00007 while(1) { 00008 if((ButtonUp==1)&&(val<255)) 00009 {wait_ms(10); 00010 val++;} 00011 else if((ButtonDown==1)&&(val>0)) 00012 {wait_ms(10); 00013 val--;} 00014 val=led; 00015 } 00016 }
Generated on Wed Jul 27 2022 23:11:07 by
1.7.2