Go Down

Topic: WiFi LED Controller (Read 49 times) previous topic - next topic

Jovan05511

Hello.
I need help with some code...
I have 20 LEDs, witch I want to control via any wifi sheild (at a reasonable price) and an Arduino uno.
The Arduino has to be a Client, and the computer a Server.
This is because the Arduino will be connected to a WiFi connection that doesn't have a Port Forwarding function, while the PC will be connected to a diffrent WiFi that has that function.
I need 10 of theese LEDs to be controlled via a momentary button (holding "W" on the keyboard will light up the green LED, holding "S" will light up the blue one, when buttons released LEDs will shut down, etc.), 5 of theese to be toggleable (pressing number "1" once on the keyboard turns the LED on, pressing the same one turns it off, same with the rest four of them), and another 5 when toggled, they blink, when toggled again they stop.
I need this to have as least latency/delay as possible
What server should i use, what WiFi sheild, and most importantly, can someone provide the code?
I never had an arduino, and i am afraid to waste money if this is not possible.
Help would be very much appreciated  :) .



(the LEDs are conected to the GND and the individual pins on the arduino)

Grumpy_Mike

Quote
the LEDs are conected to the GND and the individual pins on the arduin
I hope they are not, I hope you have resistors in seriese with each LED.

As to the code, you will need some code on your PC to send the data. This has to be written in some language that runs on the PC, a common one to use is called Processing, free and multi platform.

The the code at the Arduino end has to receive it.

I would recommend that you look at the OSC ( open sound control ) protocol as it is easy to do things like that.

As to writing code for you, we don't do that here, what we do is to help you get things right either to start with or when you are stuck.

Processing comes with plenty of examples including OSC, as does any wi-fi adaptor on the Arduino.

Go Up