Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: BufferedSerial C12832 EthernetInterface HTTPClient-SSL LM75B MMA7660 SocketIO-k64f WebSocketClient-ThermostatDemo mbed-rtos mbed picojson
Fork of df-2014-heroku-thermostat-k64f by
main.cpp
- Committer:
- ansond
- Date:
- 2014-10-09
- Revision:
- 6:74c1e9c8c90e
- Parent:
- 0:26c48388f725
File content as of revision 6:74c1e9c8c90e:
#include "mbed.h" #include "Thermostat.h" #include "BufferedSerial.h" BufferedSerial pc(USBTX, USBRX); Thermostat *thermostat = NULL; // check for exit void checkForExit() { if (pc.readable()) { char c = pc.getc(); if (c == 0x03) { // CTRL-C ASCII pc.printf("ctrl-c: closing down thermostat...\r\n"); if (thermostat != NULL) delete thermostat; pc.printf("app exiting...\r\n"); exit(1); } } } int main() { thermostat = new Thermostat(); if (thermostat != NULL) thermostat->runDemo(); }