Markus Müller
/
ampel_01
fabian lutscht :o
Revision 2:cd8fa44e7f22, committed 2014-05-28
- Comitter:
- p0ckin3d
- Date:
- Wed May 28 12:34:40 2014 +0000
- Parent:
- 1:69b163b1e72d
- Commit message:
- lucijan lutscht :o
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 69b163b1e72d -r cd8fa44e7f22 main.cpp --- a/main.cpp Wed May 28 12:19:06 2014 +0000 +++ b/main.cpp Wed May 28 12:34:40 2014 +0000 @@ -3,6 +3,8 @@ BusOut rgb(p23, p24, p25); InterruptIn button(p14); PwmOut speaker(p26); +AnalogIn poti(p19); +AnalogIn poti2(p20); void start() { @@ -18,10 +20,11 @@ rgb = ~0x01; for(unsigned char i = 0; i < 50; i++) { + speaker.period_us(poti.read() * 1000); speaker.write(0.9); wait(0.1); speaker.write(0.0); - wait(0.1); + wait(poti2.read()); } speaker.write(0.0); rgb = ~0x03;