Multisensor

Connecting multiple sensors to the cloud made simple

It takes only a handful of components and surprising small number of code lines to bring a sensor into life. The Arduino board deliver a simple and intuitive low-level prototyping platform, performing multichannel analog to digital conversion. Connecting the Arduino to the NIO 100 is simple, intuitive and cost effective way to bring this information to the cloud for analysis and sharing.

Hardware

The drawing below shows the hardware required for this demonstration

block_diagram

Arduino code

Only few lines of program are required to read two temperature sensors and send the values in °C via virtual serial port.

float sensorValue (int sensorPtr){
  float tempC = (((float)analogRead(sensorPtr)*5/1024)-1.375)/0.0225 ;
  return (tempC);
}

void setup() {
  Serial.begin(9600);
}

void loop() {
  Serial.print("sensor1:");
  Serial.print(sensorValue(0));
  Serial.print("C,");
  Serial.print("sensor2:");
  Serial.print(sensorValue(1));
  Serial.println("C");
  delay(1000);
}

IoT Studio

 

CaptureIOT

The data is saved in the cloud in JSON format.

Further, the IoT Studio program also generates live Twitter messages, publishing changes in temperature rise and fall curve. 


Thats it

The collected data is visualized in the chart below and the Twitter stream is at the left.

[amcharts id="serial-2"]

Live chart update every 60 seconds