Downloading and processing data: Newbie

Dear All,

I am new to Arduino and want to build a project with it. I want to build a RGB LED lamp whose light changes color with the change in oil price.

I have understood how to code the change in color of LED.

However, what I need to know is how to make arduino uno to connect to internet every 10 minutes and check the oil price, if it goes down from the previous price, send signal to change the color of LED to red. If it moved above the previous price, change LED color to green.

Can anyone please guide or direct me to the tutorial which explains how to do that?

Have you got an Ethernet shield or any other method of connecting the Arduino to your network ?

You will also need to think through the logic of your program. For instance, if the oil price goes up how long will the LED stay green ?

Also, "the internet" is a big place. You need to be VERY specific about where you intend to "check the oil price". The "oil price" at the local auto parts store is likely to be far more stable than the spot oil price of crude oil from OPEC.

Practice getting a reply from the server and parsing the data on a PC before you try it on the Arduino.

PaulS:
Practice getting a reply from the server and parsing the data on a PC before you try it on the Arduino.

Excellent advice.

This project may be more suitable for a Raspberry Pi or an Arduino Yun where you can do all the web stuff with a Python program.

...R

PaulS:
Also, "the internet" is a big place. You need to be VERY specific about where you intend to "check the oil price". The "oil price" at the local auto parts store is likely to be far more stable than the spot oil price of crude oil from OPEC.

Practice getting a reply from the server and parsing the data on a PC before you try it on the Arduino.

Thank you for the reply. I would be getting oil price from opec website. Now i have a source. how to it connect it with arduino?

Thank you for the reply. I would be getting oil price from opec website. Now i have a source. how to it connect it with arduino?

The most basic way would be to get a w5100 based ethernet shield and use client code on the arduino to request the data from the web site.

naukhaiz:
I would be getting oil price from opec website.

If you make a request to that website how many bytes of data does it send to you?

Is there any Javascript involved - an Arduino cannot run a Javascript interpreter.

...R