LED Matrix connected to the Internet

The M2M Developer Community offers an example of the web application for the DevStarter Arduino package. Here you can see your light sensor data as a graph. You can also create an operation which will be executed by the Arduino.
To test this web application, a “DeviceControl” sketch is included in the Cumulocity Arduino library. The string you type in the web interface will be received from the Arduino GBoard and afterwards send via the serial connection to your computer.
I wanted to find a practical use for it. So I got a few LED matrices and Rainbowduinos to control them.

Problem with the small RAM

For the communication between the GBoard and the Rainbowduinos I included the Wire library in the device control example sketch. Unfortunately, I run out of RAM after a short time so I had to search for a solution. I found out, that there is a more efficient library for the I2C communication than the wire library. There is an I2C library on Github. I changed some things that it fits my needs and saved it on Bitbucket. The GBoard code is here in the code section.

If you want to test the application you just have to go to https://developer.cumulocity.com/ui/arduino/ and log in with your M2M Developer Platform credentials. Then you have to look for the right device and in the “Device Control” section you can type something and send it to the Arduino. After a short time it will show up on the LED matrix.

Possible Use Case: Extension of the Plant Demo

Until now, this is not really a practical use case. It is just a demo. To use it more practical I could display the sensor data of my plant demo (temperature, moisture and light). If there is something wrong, maybe the moisture is too low, I would display an alarm.
The alarm would be fast and easy to implement. All that I need to do is to include a function that creates an operation if the moisture is to low. This would be done on the device which collects the data.

Update – August 28th, 2013

I have just noticed, that it is not possible with the Cumulocity Arduino Client to create an operation. For that reason I had to extend this library so I can send an operation to the M2M Developer Platform. The modified library is on Bitbucket. Or you can click here to Download the latest version as a Zip file. I also included an example where you can test this new feature.

Comments 1

  1. Pingback: How to get started with M2M DevStarter | Let Machines Talk Let Machines Talk

Leave a Reply

Your email address will not be published. Required fields are marked *