Ciaran Doyle
/
analogo
Illustration
Diff: main.cpp
- Revision:
- 0:c8b99e4996d4
diff -r 000000000000 -r c8b99e4996d4 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri Apr 09 17:19:42 2021 +0000 @@ -0,0 +1,15 @@ +#include "mbed.h" +// This doesn't seem to be doing a whole lot. Do note that the range +// is 0 - 1, just like AnalogIn objects. +AnalogOut ao(PTE30); + +int main() { + while(1) { + ao = 1; + wait(1); + ao = 0.5; + wait(1); + ao = 0; + wait(1); + } +}