This project is a simple demonstration of how check weather condition by means of a Linino One and a LED, as the unique indicator, to know the weather forecast related to rainfall.

Final result is a more or less brightning led that indicate the percentage of precipitation in a specific place. More precipitation correspond to a more intense brightness of LED.

Data related to precipitation are obtained using the module weather-js, that receives data from weather.service.msn.com

* An important requirement is to know the Linino's world. Visit the website to find all the necessary information for a correct set up of your Linino One. See http://www.linino.org/ and the wiki page http://wiki.linino.org/ .

Step 1: What You Need

* Linino One


Step 2: Connect

Follow the schema of the project.

Step 3: Programming

Create a new project in Ideino IDE, choose name and modify files package.json and server.js as follow:

package.json ( you can customize the fields name, version, description and author with your information)

"name": "", "version": "0.0.1", "description": "Check precipitation", "author": { "name": "Ideino Team" }, "dependencies": { "weather-js": "*" } }

It's used to specify dependencies. In our case the module “weather-js” is included.

Save the file package.json, then CLICK with the right mouse button on the file in the left menu and install it.

server.js and that's it ! Change value of "search" in "weather.find to" check your town.

var linino = require('ideino-linino-lib'),
board = new linino.Board(); var weather = require('weather-js');

var precipitation; var pin = 'P9';

board.connect(function() {

board.pinMode(pin, board.MODES.PWM);

setInterval(function() {

// search: location name or zipcode // degreeType: F or C

weather.find({ search: 'Messina', degreeType: 'C' }, function(err, result) { if (err) console.log(err);

precipitation = Number(result[0].forecast[0].precip);

console.log("Local Time: " + new Date()); console.log("Observation Time: " + result[0].current.observationtime); console.log("Probability of Precipitation is " + precipitation + '%'); console.log("Today's forecast is " + result[0].forecast[0].skytextday); console.log("Temperature: " + result[0].current.temperature + "°"); console.log("----------------------------------------------------------------------");

board.analogWrite(pin, precipitation);

}); }, 3600000); //Check hours every hour. 1h=3600000


Step 4: Conclusions

This would be only the first step to explain the great opportunity offered by the development of Linino boards with external modules available online.

Then, before to go out check Led, if the light is strong don't forget your umbrella!

<p>Woah that's such an awesome gadget, and so useful depending on where you live! Welcome to instructables, hope we see more awesomeness from you in the future!</p>
<p>Thank you. It's a pleasure for me share my project here. Soon the next, it's ready. Stay tuned :-) </p>

About This Instructable




More by alelupo:Grow Your Plant with Linino Check Precipitation with Linino 
Add instructable to: