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: libxDot-mbed5 ISL29011
Fork of Dot-Examples by
Revision 25:bd723518db86, committed 2018-02-11
- Comitter:
- cakrueger2
- Date:
- Sun Feb 11 00:01:23 2018 +0000
- Parent:
- 24:d80afce304c6
- Commit message:
- one
Changed in this revision
--- a/examples/example_config.h Tue Jul 11 10:46:17 2017 -0500 +++ b/examples/example_config.h Sun Feb 11 00:01:23 2018 +0000 @@ -9,7 +9,7 @@ // the active example is the one that will be compiled #if !defined(ACTIVE_EXAMPLE) -#define ACTIVE_EXAMPLE OTA_EXAMPLE +#define ACTIVE_EXAMPLE 4 #endif // the active channel plan is the one that will be compiled
--- a/examples/src/peer_to_peer_example.cpp Tue Jul 11 10:46:17 2017 -0500
+++ b/examples/src/peer_to_peer_example.cpp Sun Feb 11 00:01:23 2018 +0000
@@ -163,34 +163,23 @@
while (true) {
uint16_t light;
- std::vector<uint8_t> tx_data;
+ std::vector<uint8_t> rx_data;
// join network if not joined
if (!dot->getNetworkJoinStatus()) {
join_network();
}
-#if defined(TARGET_XDOT_L151CC)
- // get the latest light sample and send it to the gateway
- light = lux.getData();
- tx_data.push_back((light >> 8) & 0xFF);
- tx_data.push_back(light & 0xFF);
- logInfo("light: %lu [0x%04X]", light, light);
- send_data(tx_data);
-#else
- // get some dummy data and send it to the gateway
- light = lux.read_u16();
- tx_data.push_back((light >> 8) & 0xFF);
- tx_data.push_back(light & 0xFF);
- logInfo("light: %lu [0x%04X]", light, light);
- send_data(tx_data);
-#endif
- // 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);
+ dot->openRxWindow(6000, dot->getFrequencyBand());
+ dot->recv(rx_data);
+ for(int i = 0; i< rx_data.size(); i++)
+ {
+ logInfo("%x02",rx_data[i]);
+ }
+ //wait(6);
+ void closeRxWindow();
+
}
return 0;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libxDot-mbed5.lib Sun Feb 11 00:01:23 2018 +0000 @@ -0,0 +1,1 @@ +http://os.mbed.com/teams/MultiTech/code/libxDot-mbed5/#fc3817b65dca
