Adam Ciechalski
/
Inst_LAB_1
PicoScope experiment
Diff: main.cpp
- Revision:
- 0:774b1d4dd4d2
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Sat Apr 13 13:26:52 2019 +0000 @@ -0,0 +1,18 @@ +#include "mbed.h" + +AnalogOut Aout (p18); + +float i; + +int main(){ + while(1) { + for (i=0; i<=1; i=i+0.001) { + Aout = i; + wait (0.0001); + } + for (i=1; i=>0; i=i-0.001){ + Aout = i; + wait (0.0001); + } + } + } \ No newline at end of file