SmartPlant Hydrophonic Plant System
Dependencies: mbed
main.cpp
- Committer:
- Arkadi
- Date:
- 2018-04-26
- Revision:
- 0:dcb40e3b02c6
- Child:
- 1:62bcb62b37cc
File content as of revision 0:dcb40e3b02c6:
#include "mbed.h" //------------------------------------ // Hyperterminal configuration // 57600 bauds, 8-bit data, no parity //------------------------------------ Serial pc(SERIAL_TX, SERIAL_RX); Serial BLE(D1, D0); DigitalOut myled(LED1); int main() { pc.baud(57600); BLE.baud(57600); pc.printf("Hello Plant!\r\n"); BLE.printf("Hello Plant !\r\n"); while(1) { //wait(1); //pc.printf("This program runs since %d seconds.\r\n", i++); //BLE.printf("This program runs since %d seconds.\r\n", i++); while(BLE.readable()) { uint8_t in_byte = BLE.getc(); pc.putc(in_byte); } while(pc.readable()) { uint8_t in_byte = pc.getc(); BLE.putc(in_byte); } myled = !myled; } }