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
- Committer:
- m210198
- Date:
- 2018-09-20
- Revision:
- 0:db1b39babf83
- Child:
- 1:1fb5ff2554ca
File content as of revision 0:db1b39babf83:
#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); } } }