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
Diff: main.cpp
- Revision:
- 0:db1b39babf83
- Child:
- 1:1fb5ff2554ca
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Sep 20 19:20:10 2018 +0000 @@ -0,0 +1,33 @@ +#include "mbed.h" +int main() { +DigitalOut tony[5]={p26,p27,p28,p29,p30}; + tony[p26]=0; + tony[p27]=0; + tony[p28]=1; + tony[p29]=0; + tony[p30]=0; + int x; + Digital sw1( + while(1) { + if(sw1== 1 && sw2==1){ + tony[x]=0; + x=2; + tony[x]=1; + } + + else if (sw1==1){ + tony[x]=0; + if(x=4); + x++;} + tony[x]=1; + wait(0.5); + } + else if (sw2==1){ + tony[x]=0; + if(x=0); + x--;} + tony[x]=1; + wait(0.5); + } + } +}