Alex Leung
/
Nucleo_read_analog_value
123
Diff: main.cpp
- Revision:
- 0:b3b9ee2613e5
- Child:
- 1:361a6fe46f88
diff -r 000000000000 -r b3b9ee2613e5 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon Oct 09 07:49:50 2017 +0000 @@ -0,0 +1,12 @@ +#include "mbed.h" + +Serial pc(USBTX, USBRX); +int rn; +int main() { + + while(1) { + rn = (rand()%11)+35; + pc.printf("%d\n",rn); + wait(1); + } +}