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.
test.cpp
- Committer:
- daihuku
- Date:
- 2014-07-01
- Revision:
- 0:0da7dd3ebad8
- Child:
- 1:c4b60ff5a79a
File content as of revision 0:0da7dd3ebad8:
#include "mbed.h"
BusOut leds(P1_13, P1_14, P1_22, P0_17, P0_18, P0_19, P1_15, P0_1);
void single(unsigned char bit);
void all();
void rotate();
void takahiro();
int main()
{
while(1)
{
single(0);
wait(2);
all();
all();
rotate();
rotate();
takahiro();
takahiro();
}
}
void single(unsigned char bit)
{
leds = 1 << bit;
}
void all()
{
leds = 0xff;
wait(7);
leds = 0x00;
wait(1);
}
void rotate()
{
int bitt;
for(bitt = 0x00; bitt < 10; bitt++)
{
leds = 1 << bitt;
wait(1);
}
}
void takahiro()
{
}