1
Page last updated 21 Mar 2016, by
0
replies
.
- include "mbed.h"
BusOut Bar(D4,D5,D6,D7,D8,D9,D10,D11);
AnalogIn ain(A0);
int a;
void speed()
{
a=ain.read();
wait(a+0.1);
}
void showled()
{
for(int i=1; i<8 ;i++)
{
Bar=1<<i;
speed();
}
for(int i=7; i>0 ;i
) { Bar=1<<i; speed(); } } int main() { while(1) { showled(); } }
Please log in to post comments.