To log data in the cloud, we will use a service called Dweet.io. Dweet.io is a simple publishing and subscribing platform created for machines, gadgets, and any form of computer. There's no sign up or set up required so you can use it instantly.
Then, we include the following libraries, which are used to communicate with the pins of the Galileo board:
var mraa = require("mraa"); var util = require('util'); var request = require('request');
We need to set the analog pins and set their resolution to 12 bits:
var light_sensor_pin = new mraa.Aio(0); light_sensor_pin.setBit(12); var temp_sensor_pin = new mraa.Aio(1); temp_sensor_pin.setBit...