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.
Diff: main.cpp
- Revision:
- 0:597324ae35ab
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon Jun 01 20:16:22 2015 +0000 @@ -0,0 +1,24 @@ +// Toggle a LED +#include "mbed.h" + +DigitalOut led1(PB_1); +DigitalOut led2(PB_2); +AnalogIn potencjometr(PB_0); +float x ; +int main() { + led2=1; + while(1) { + x=potencjometr.read(); + if (x>=0.5) + { + led1 = !led1; + wait(0.05); + } + if (x<0.5) + { + led1 = !led1; + wait(0.3); + } + + } +}