-
1Preparing the Hardware
Really, there is nothing a lot to do in here. You just prepare the Rapid IoT kit out of the box and a raspberry pi with an SD card and a decent power source.
-
2Preparing the Software
There are few things needed to do for the software:
- Raspbian
just follow this link to install the os
- Python 2 or 3
Already built in for the raspbian
- Pygatt and few of its components
$ pip install pygatt $ pip install "pygatt[GATTTOOL]" $ pip install pexpect
Pygatt is needed to read the advertisements data from the Rapid IoT kit using the ble connection
- cloud4rpi
$ pip install cloud4rpi
This is needed to connect the data to the Cloud4rpi iot service
I already try various kind of online iot dashboard service such as ubidots, adafruit, thingspeak, etc. For this projects I am gonna use cloud4rpi because of its simplicity and easy to build dashboard system
-
3Program the Rapid IoT Kit
The code and firmware that used for this projects are attached below. To reserve power I turn off the backlight and only send the data I need for the project. If you want clone the project just import the.atmo files attached below
-
4Program the Raspberry Pi
Before you program the raspberry pi, make sure you already have a Device Token from the cloud4rpi service. Check this github page for more clear documentation
If you already install the library that I was mentioned above, than you can run the python code without any problem. But there are few things that need to be change based on your credentials
import time import pygatt import cloud4rpi mac = '00:00:00:00:00:00' #change this to your Rapid IoT kit Mac Address DEVICE_TOKEN = 'xxxxxxxxxxxxxxxxx' #change this to your cloud4rpi device token
after you change the two lines just run the cloudscan.py files and you are good to go.
If everything work correctly open your device menu on cloud4rpi and should get this screen
Data has been retrieved
Now you can make your own dashboard on the control panel menu based on the data you just sent
Project Dashboard
-
5Further Development
Due to the small amount of time I can give in this project, There are a few more feature I was planning to add in this project, such as:
- Using the Rapid IOT Kit NFC to identify and give the information of the various kind of plant or assets existed in the park
- Adding a small solar panel to charge the Rapid IoT kit
- Burglar detection by activating the shock/fall feature and immediately send an alarm notification to the park guards
- Track moving assets that could be hard to find by making an local positioning ble system
Hopefully in the near future I can continue this project and make those plan fulfilled
-
6the Code
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.