Change a LED via the web

Arduino Computers & Mobile Technology
Change a LED via the web

Colorpicking
Ladyada writes

Here is an example of how to make a cool Internet application using the XPort shield I recently released. This is very simple, but its a good example of getting and outputting data. Basically the Arduino serves up a webpage with a bunch of nice javascript code that allows you to select a color. It also displays a “current color” (in this case a light green).

Ledcolorpickerhard T
When you click “Submit” on the page, another request is made to the XPort/Arduino, this time with a GET command ?color=#xxxxxx with the color information. The Arduino looks for this command, parses the color requested and calls analogWrite() on the three LEDs to change them into that color.

What will the next generation of Make: look like? We’re inviting you to shape the future by investing in Make:. By becoming an investor, you help decide what’s next. The future of Make: is in your hands. Learn More.

Tagged

current: @adafruit - previous: MAKE, popular science, hackaday, engadget, fallon, braincraft ... howtoons, 2600...

View more articles by Phillip Torrone
Discuss this article with the rest of the community on our Discord server!

ADVERTISEMENT

Escape to an island of imagination + innovation as Maker Faire Bay Area returns for its 16th iteration!

Prices Increase in....

Days
Hours
Minutes
Seconds
FEEDBACK