Simulated product dispenser
Fork of mbed-cloud-workshop-connect-HTS221 by
Revision 2:d5f5207e8b2a, committed 2018-10-22
- Comitter:
- JimCarver
- Date:
- Mon Oct 22 22:59:34 2018 +0000
- Parent:
- 1:521604503e81
- Child:
- 3:0d3492ebb1a5
- Commit message:
- Improved reliability
Changed in this revision
--- a/main.cpp Fri Oct 19 02:01:38 2018 +0000 +++ b/main.cpp Mon Oct 22 22:59:34 2018 +0000 @@ -159,6 +159,9 @@ */ void registered(const ConnectorClientEndpointInfo *endpoint) { printf("Connected to Mbed Cloud. Endpoint Name: %s\n", endpoint->internal_endpoint_name.c_str()); + Ticker timer; + timer.attach(eventQueue.event(&fake_button_press), 5.0); + HTS221Thread.start(HTS221Handler); } int main(void) { @@ -248,9 +251,7 @@ // Placeholder for callback to update local resource when GET comes. // The timer fires on an interrupt context, but debounces it to the eventqueue, so it's safe to do network operations - Ticker timer; - timer.attach(eventQueue.event(&fake_button_press), 5.0); - HTS221Thread.start(HTS221Handler); + // You can easily run the eventQueue in a separate thread if required eventQueue.dispatch_forever();
Binary file qspi-blockdevice/.git/index has changed
Binary file simple-mbed-cloud-client/.git/index has changed
Binary file simple-mbed-cloud-client/mbed-cloud-client/.git/index has changed
Binary file wifi-ism43362/.git/index has changed