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
- Committer:
- tim004
- Date:
- 2014-03-10
- Revision:
- 0:e01b40aff738
File content as of revision 0:e01b40aff738:
#include "mbed.h"
BusOut ledice(dp28,dp6,dp5,dp27,dp26,dp25,dp24,dp23);
DigitalOut enable(dp14);
DigitalIn taster(dp1);
int main() {
enable=0;
int i=0;
while(1) {
if(!taster)
{
ledice=i;
wait(1);
if(i>=255)
i=0;
else
i++;
}
else if(taster)
{
ledice=i;
wait(1);
if(i<=0)
i=255;
else
i--;
}
}
}