Easylube
Dependencies: DS1820 libmDot mbed-rtos mbed
Diff: main.cpp
- Revision:
- 1:0fe7bd229e28
- Parent:
- 0:7e7bd4f937c7
- Child:
- 2:26ffaed90e4f
--- a/main.cpp Thu Jul 07 06:53:09 2016 +0000 +++ b/main.cpp Tue Aug 23 08:47:09 2016 +0000 @@ -22,6 +22,23 @@ int pulseCount = 0; bool initial = 1; +void PrintID() +{ + mDot* dot = mDot::getInstance(); + std::vector<uint8_t> unitID = dot->getDeviceId(); + char EUI[20]; + char Id[2]; + string Ident; + + for(int n = 0; n < 8; n++) + { + sprintf(Id,"%02X",unitID[n]); + strcat (EUI,Id); + } + Ident = EUI; + logInfo("UID = %s \r\n",Ident.c_str()); +} + void ConfigLora(mDot* dot) { int32_t ret; @@ -36,6 +53,8 @@ dot->setLogLevel(mts::MTSLog::INFO_LEVEL); + PrintID(); + // frequency sub band is only applicable in the 915 (US) frequency band // if using a MultiTech Conduit gateway, use the same sub band as your Conduit (1-8) - the mDot will use the 8 channels in that sub band // if using a gateway that supports all 64 channels, use sub band 0 - the mDot will use all 64 channels