How to get sensor data

Is the sensor data from all the sensors a stream of data that I could use inside my own program ? I want to use Node-RED serial node (see http://nodered.org/) to get any data into Node-RED and do stuff with it.

Hi kwiatks,
Right now the data that is coming from GrovePi is coming via I2C and is in a particular packet format. I don’t have any experience in Node-RED, but in theory you can write a program in Python or C to feed the data to Node-RED (we haven’t tried this with Node-RED).

In case of sensors sending serial data, you might be able to integrate them directly with Node-RED, but it all depend on what kind of data does Node-RED accept.

Just to chime in: it’s very easy to write a program for the GrovePi that sends data to the Raspberry Pi. You’re able to do this over serial or I2C. You can use python or C to read the serial or I2C lines.

Having no experience with Node-RED, we’re not sure if you can read the serial line directly on the Raspberry Pi; if you’re able to read serial or I2C data on the Raspberry Pi with Node-RED, this will work.

So are all sensors that are connected to GrovePi sending data is a serial stream as well as I2C ? can you pick which one somehow ? If so then if all sensor data can be sent in a serial stream then it’s quite easy to use Node-RED to split up the data and then use it further down the “flows” of Node-RED to manipulate the data or send it onto other systems (like mosquitto). I am involved in a school project to use Node-RED and the SensorTag from Texas instruments (http://processors.wiki.ti.com/index.php/Bluetooth_SensorTag).

Kwiatks,
Sounds like a fun project.

karan’s right, the standard program is going to relay info back in a certain way. However, the GrovePi is controller by an Arduino on the board. You can pretty easily re-write the way it communicates with the Raspberry Pi. If you want to send info back and forth over serial, or I2C, you can rewrite the code examples we have and send the info in any format you’d like to.