![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Fork to see if I can get working
Dependencies: BufferedSerial OneWire WinbondSPIFlash libxDot-dev-mbed5-deprecated
Fork of xDotBridge_update_test20180823 by
Diff: xDotBridge/src/main.cpp
- Revision:
- 23:4ed894108882
- Parent:
- 22:9453658b8d4b
- Child:
- 24:fdf87e4b72e5
--- a/xDotBridge/src/main.cpp Fri Dec 30 11:46:31 2016 -0700 +++ b/xDotBridge/src/main.cpp Fri Dec 30 19:10:41 2016 +0000 @@ -101,9 +101,8 @@ // display configuration display_config(); - + uint16_t seqNum=0; while (true) { - uint16_t seqNum; std::vector<uint8_t> tx_data; // join network if not joined @@ -111,16 +110,14 @@ join_network(); } - tx_data.push_back((light >> 8) & 0xFF); - tx_data.push_back(light & 0xFF); - logInfo("light: %lu [0x%04X]", light, light); + tx_data.push_back((seqNum >> 8) & 0xFF); + tx_data.push_back(seqNum & 0xFF); + logInfo("seqNum: %lu", seqNum); send_data(tx_data); - - // the Dot can't sleep in PEER_TO_PEER mode - // it must be waiting for data from the other Dot - // send data every 5 seconds - logInfo("waiting for 5s"); - wait(5); + seqNum++; + + + dot->sleep(); } return 0;