Technology advancement paves new roads for makers to move forward. I am going to unveil such a tech with my project. First one is Avent IOTConnect and other one is Nordic Semiconductor nRF52840 DK. Avent IOTConnect is the most advanced unified IoT platform sensors, gateways and edges. There are SDK for almost all computer languages such as python, C/C++, C#, JS, Android and etc. On the other hand Nordic Semiconductor nRF52840 DK is a marvelous development kit with almost all the wireless technologies such as Bluetooth Low Energy, Bluetooth mesh, Thread, Zigbee, 802.15.4, ANT and more. I am going to build a movement tracking system using nRF52840 DK and Avent IOTConnect that will help #ElephantEdge to protect the world largest land animal #ELEPHANTS.How it works?
The heart of the system is nRF52840 DK. A simple accelerometer (MPU6050) has connected to nRF52840 DK. When the movement happens nRF52840 DK reads values from accelerometer and pass this data to IoT gateway via BLE. I am using Android phone as the IoT gateway (integrating Android with Avnet IOTConnect is super simple, because of the Android SDK and their highly skilled support team promptly support). Then IoT gateway pass those readings to Avnet IOTConnect via MQTT (no need worry about the message broker, the connection happens magically with the Avnet IOTConnect Android SDK). Avnet IOTConnect has superb dashboard and using it we can monitor the movement easily.Connecting Android phone with Avnet IOTConnect
To demonstrate communication between Android and Avnet IOTConnect I have written simple application using their concise Android simple SDK.
The Android application code can be found here.Connecting nRF52840 DK with Android
To demonstrate the connectivity between Nordic nRF52840 and Android using BLE, I am using the sample applications provided by Nordic Semiconductor. For Android I am using Nordic Blinky, you can find the sample code here. For nRF52 I am using code sample in nRF5_SDK_17 > ble_peripheral > ble_app_blinky > pca10056 > s140 > ses. The SDK can be found here.
Load the ble_app_blinky into SEGGER Embedded Studio and add below lines into the main.c
err_code = ble_lbs_on_tem_change(m_conn_handle, &m_lbs, (int)temp*25/100);
if (err_code != NRF_SUCCESS &&
err_code != BLE_ERROR_INVALID_CONN_HANDLE &&
err_code != NRF_ERROR_INVALID_STATE &&
err_code != BLE_ERROR_GATTS_SYS_ATTR_MISSING)
n = rand() % 10 + 25;
Here I use SoftDevice temperature readings. In Android Blinky app I have integrated Avnet IOTConnect to send data to IOTConnect platform. The entire setup as follows,
For the moment nRF SDK 17 does not have any sample code to integrate MPU6050 with nRF52840 except MPU6050 drivers. I am current making a sample code to read values from the sensor. Until I complete the making of that code, I conclude my project.Conclusion
I strongly believing in Nordic Semiconductor nRF52840 DK and Avnet IOTConnect chemistry will make strong bond in maker community. I highly recommend these two can be a great choice for "Wildlife Tracker". I just scratched the surface of these two giant mountains. There are more to learn and more to practice. Hope you will give it a try. I wish #ElephantEdge all the best for the effort they put forward to protect wildlife specially #ELEPHANTS.