fp
Dependencies: libmDot-mbed5 ISL29011
Diff: examples/src/class_c_example.cpp
- Revision:
- 12:ec9768677cea
- Parent:
- 10:4d0b765f7b9e
- Child:
- 14:19fae4509473
--- a/examples/src/class_c_example.cpp Tue Oct 11 11:49:56 2016 -0500 +++ b/examples/src/class_c_example.cpp Tue Oct 11 13:17:42 2016 -0500 @@ -112,7 +112,12 @@ dot = mDot::getInstance(); - // make sure library logging is turned on + // start from a well-known state + logInfo("defaulting Dot configuration"); + dot->resetConfig(); + dot->resetNetworkSession(); + + // make sure library logging is turned on dot->setLogLevel(mts::MTSLog::INFO_LEVEL); // attach the custom events handler @@ -125,7 +130,7 @@ logError("failed to set network join mode to OTA"); } } - // in OTA and AUTO_OTA join modes, the credentials can be passed to the library as a name and passphrase or an EUI and KEY + // in OTA and AUTO_OTA join modes, the credentials can be passed to the library as a name and passphrase or an ID and KEY // only one method or the other should be used! // network ID = crc64(network name) // network KEY = cmac(network passphrase) @@ -150,10 +155,12 @@ // display configuration display_config(); +#if defined(TARGET_XDOT_L151CC) // configure the ISL29011 sensor on the xDot-DK for continuous ambient light sampling, 16 bit conversion, and maximum range lux.setMode(ISL29011::ALS_CONT); lux.setResolution(ISL29011::ADC_16BIT); lux.setRange(ISL29011::RNG_64000); +#endif while (true) { uint16_t light;