Etienne Stransky
/
Communication_energie
ok
Diff: main.cpp
- Revision:
- 0:693ffe0e7bb9
diff -r 000000000000 -r 693ffe0e7bb9 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Feb 12 14:45:30 2019 +0000 @@ -0,0 +1,15 @@ +#include "mbed.h" + +Serial centrale(p9, p10); + +int main() { + double niveau = 1; + centrale.baud(9600); + + while(1) { + centrale.printf("$%3lf*\n\r",niveau); + niveau = -1.5*niveau; + if(niveau>10000) niveau = 1; + wait(0.5); + } +}