Go Down

Topic: manage light with arduino internet shield and nodoshield (Read 921 times) previous topic - next topic

remkohuitema

Dec 29, 2011, 07:19 pm Last Edit: Dec 29, 2011, 07:21 pm by remkohuitema Reason: 1
I've bought this http://www.samenkopen.net/action_product/38663/249425 nodoshield and it works fine with my arduino (without internet shield). I use a universal remote (Harmony one) to manage this receivers http://www.klikaanklikuit.nl/shop/producten/ontvangers/acm-251/.
The nodoshield translate the signal from IR (harmony one) tot RF (acm251).
I want to make a step forward and want to control the lights with my iPhone by using HTML to format server response for example. So I bought also a network shield.
I see sketches (out of the arduinocookbook) with which I can control pins (buttons in the web browser and the Arduino web server will respond to the button clicks). Is this the right way to control my lights? Is it possible (because I want more than just switch a pin on or off, I want to give a commando which trigger a RF signal/433,92MHz )?
Does someone has a examplesketch for something like this?







remkohuitema


PaulS

Quote
Does someone has a examplesketch for something like this?

You are asking for someone else to write a sketch that is very specific to your hardware setup. It is unlikely that anyone else has used the same hardware for the same thing that you want.

You need to break your problem up into smaller pieces.

The shield link you provided is not in English, so, unfortunately, most of us can't read it. It does not even have a picture of the shield, so I can't even guess what a nodo shield does. Apparently, you know, and it works for you.

The link on the shield page, to a pdf file, is blocked by my company. I have no idea why, but it prevents me from seeing if there will be a pin conflict with the nodo shield and the ethernet shield.

Presuming that there are not, the sketch that you have now must read from a remote, determine what action to perform (button 5 was pushed, so ...) and perform that action (send a message).

Your ethernet shield, as a web server, could serve up a page that looked like your remote, with buttons on it. The page itself would contain a form, and each button would be a submit button.

When a connection is made, you need to parse the GET command, and determine whether it is an initial request, or a result of a submit. If it is an initial request, serve up the page. If it is a submit action, determine, from the data in the GET request, which button was pressed, and perform the same action that was performed when the button on the remote was pressed.

Posting the code that you have now would be useful. We could suggest how to modify it to also be a web server.

Go Up