• Web Server & LED Blink

A simple web server that shows and control the value of the LED Digital using an Arduino Wiznet Ethernet shield. This sketch for GR-KURUMI is merged Web-server and LED Blink. You can do controlling and monitoring the RGB LED on GR KURUMI Board via Internet or Local Network.
After opening a web-browser and navigating to the Ethernet shield’s IP address, the GR-KURUMI will respond with just enough HTML for a browser to display the data. A RGB LED on GR-KURUMI is also controlled by the request of web-browser.

  • Circuit
  • Ethernet shield attached to pins 10, 11, 12, 13
  • Pin 22,23,24 has an LED connected on most Arduino boards.
  • Pin22: LED_RED
  • Pin23: LED_GREEN
  • Pin24: LED_BULE
  • SW
  • Code
  • Configuration of IP address

    IPAddress ip(192,168,1,177);

  • Initalize the Port (port80 is default for HTTP)

    EthernetServer server(80);

  • Parsing of HTTP GET Message

When web-page address is to on the Green LEN,
the received HTTP GET Message is as below,

GET /G0 HTTP/1.1
Accept: text/html, application/xhtml+xml,....

So, 5th~7th data are parsed to control RGB LEDs.

//5th~7th data of HTTP GET Message is parsed as parse_arr
parse_arr[0] = '/'
parse_arr[1] = 'G'
parse_arr[2] = '0'