Build your own Cloud-based Internet of Things!

Big Thanks to my friends in Jelastic (a PaaS Cloud solution) for hosting a short tutorial on how to use their Cloud hosting service for developing an IoT application.

The tutorial presents all essential steps for configuring the Cloud environment and building a J2EE application that can receive sensor readings and visualize them!

For this setup I have used Tomcat and MySQL.

A similar example is presented in the book that utilizes Google App Engine instead.

To send sensor data to the Cloud application all you need to do is instruct your Arduino to invoke a simple web request like this one:

The following Arduino code uses the Ethernet Library to do so:


#include <SPI.h>

#include <Ethernet.h>

// Enter a MAC address for your controller below.
byte mac[] = {  0x00, 0xAA, 0xBB, 0xCC, 0xDE, 0x02 };
char serverName[] = "";
// Initialize the Ethernet client library
EthernetClient client;

void setup() {
// start the serial library:
//start the Ethernet connection:
if (Ethernet.begin(mac) == 0) {
Serial.println("Failed to configure Ethernet using DHCP");


void loop() {

int temperature = analogRead(0);
String s = String(temperature,DEC);

if (client.connect(serverName, 80)) {
// Make a HTTP request:
client.println("GET /add?sensor=temp&value="+s+" HTTP/1.0");


To visualize the data just invoke in your browser. You should get a graph like the following:

One thought on “Build your own Cloud-based Internet of Things!

Leave a Reply

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