This is a guest post from one of our fantastic users, Plant-OS (www.plant-os.com / @plant_OS).
While developing our prototype, we found challenges implementing a web based dashboard that extends well with the Arduino Yun platform. Most data streaming platform providers have general support for Arduino, however most weren't clear enough and were generally buggy. We were glad to find the sample code provided by Initial State for the Arduino Yun worked well; we started integrating this with our hardware.
While testing the code with our hardware we found a few challenges when increasing the number of sensors beyond four. After some local and networking debugging efforts we found that the packets sent were being truncated and therefore were not being accepted by Initial State's service.
Figure 1: Packets being truncated
We then contacted Initial State support and discussed with David Sulpy, Founder and CTO, to resolve the matter collaboratively. Amongst several suggestions was to use parameter encoded keys and values rather than body encoding with JSON which turned out to be a little friendlier to lower power devices without JSON parsers like the Arduino Yun.
Code 1: curl example
We then revised the postBucket()
function in arduinoyunstream.ino to accommodate nine live streaming parameters and it worked! The code that worked for us is shared below. You are required to provide your accessKey, bucketKey, bucketName, number of signals to be streamed, and signal names in our example.
About Plant OS:
Our vision is to enable autonomous agriculture computers to operate digital farms of the future with local communities. We believe local communities should be empowered to localize food production at scale. We have recently initiated an open source movement with MIT CityFarm to work on Machine Learning applications from a digital footprint of a plant.
www.plant-os.com / @plant_OS
Comments
0 comments
Article is closed for comments.