A general application for wireless sensor networks is gathering sensor data from the deployed motes and making some predication/operation based on those sensed data. In this page, you will learn how to do this based on OpenWSN project.
Hardware you need
- 2x OpenMotes
- 1x OpenBase
- 1x mini B cable
- A computer running the OpenWSN environment installed
- Program two OpenMotes
uinject application running on the mote generates dummy data (a counter value increasing at each packet) every 30 seconds and sends it to the manager.
By default, this app is disabled. You can enable it following those procedures. Compiling them and download the code to your motes after you did those modification.
- connect one to your computer and power on the other one
- on your computer, double-click on
you need to change a little bit in
uinject_dagroot.py to make it work on your computer
- That's It!
uinject_dagroot.py application prints on screen what you are receiving from the other mote, which is the counter value increasing from 0.Once the printing works you can:
uinject fancier to include real sensor data. I would recommend to then rename the application
- make the
uinject_dagroot.py fancier and log/send/tweet the received data
Besides, the latency of each packet starting from being generated until received by dagroot is printed on screen right after the counter. It's shown in seconds and the accuracy is one slot long which is 15ms.