April 2, 2008 AT 8:50 pm

Change my LED via the web!

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)

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.

Want to try it out? Go to -> http://ladyada.net/make/eshield/colorpickerfwd.html which will forward you to the correct IP address (since I dont have DNS for my home network). The XPort can only receive one connection at a time so if you cant get thru, please be patient! :)

Read more about the XPort shield here and get the source code and other details from this page


“D is for Diode” – Circuit Playground Episode 4 is out now! CLICK HERE TO WATCH!

Have an amazing project to share? Join the SHOW-AND-TELL every Wednesday night at 7:30pm ET on Google+ Hangouts.

Join us every Wednesday night at 8pm ET for Ask an Engineer!

Learn resistor values with Mho’s Resistance or get the best electronics calculator for engineers “Circuit Playground”Adafruit’s Apps!



3 Comments

  1. Wow that looks great. I think you pretty much convinced me to buy a XPort Direct =)

  2. Wha :) I’ve just bought this xport shield last week, and was hoping to do something similar, now it’s great to have some code to extend the idea a bit further :)

  3. It´s soo interesting. Have a nice day.

Sorry, the comment form is closed at this time.