Created
October 8, 2012 11:48
-
-
Save biskandar/3852096 to your computer and use it in GitHub Desktop.
Simplified webserver module using Webduino library 2012100802
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "SPI.h" | |
#include "Ethernet.h" | |
#include "WebServer.h" | |
#include "aJSON.h" | |
// prepare for the ethernet profile | |
static uint8_t mac[] = { 0x00 , 0x08, 0xDC, 0x00, 0x00, 0x09 } ; | |
static uint8_t ip[] = { 169, 254, 62, 169 } ; | |
// prepare for webserver with webduino | |
WebServer webserver( "" , 80 ) ; | |
void setup() { | |
// debug purpose | |
Serial.begin( 9600 ) ; | |
Serial.println( "Debug on" ) ; | |
// initialized for the ethernet connection | |
Ethernet.begin( mac , ip ) ; | |
// setup default command request of the webserver | |
webserver.setDefaultCommand( &defaultCommand ) ; | |
// start the server | |
webserver.begin() ; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment