Transmit pressure/temperature reading once per hour from xDot to iupivot server
Dependencies: ATParser MPL3115A2 mbed
main.cpp
- Committer:
- csinders
- Date:
- 2018-04-03
- Revision:
- 0:50820e1648aa
- Child:
- 1:b672c24629d5
File content as of revision 0:50820e1648aa:
#include "mbed.h" #include "MPL3115A2.h" MPL3115A2 pressure_sensor(PB_7,PB_6,0x60); Serial pc(SERIAL_TX, SERIAL_RX, 115200); Serial device(PA_9, PA_10, 115200); // tx, rx DigitalOut myled(LED1); int main() { //Try to connect xDot to network while(1) { if(pc.readable()) { device.putc(pc.getc()); myled = !myled; } if(device.readable()) { pc.putc(device.getc()); myled = !myled; } } }