Rosario Schiano Lo Moriello
/
Example11AccelerometerSimulator
Accelerometer simulator
main.cpp
- Committer:
- rschiano
- Date:
- 2020-10-12
- Revision:
- 0:8ef83d7dc88d
- Child:
- 1:a31564d0b86c
File content as of revision 0:8ef83d7dc88d:
#include "mbed.h" Serial pc(PA_2,PA_3,115200); char data; int dato1 = 12345; float dato2 = 1.2345e-21; int main(){ pc.printf("Hello world!!!\r\n"); pc.putc('T'); pc.putc('h'); pc.putc('i'); pc.putc('s'); pc.putc(' '); pc.putc('i'); pc.putc('s'); pc.putc(' '); pc.putc('p'); pc.putc('u'); pc.putc('t'); pc.putc('c'); pc.putc('\r'); pc.putc('\n'); pc.printf("The first value is %d and the second value is %e\r\n",dato1,dato2); while(1){ data=pc.getc(); pc.putc(data); if(data=='\r') pc.putc('\n'); } }