Created
September 21, 2011 10:28
-
-
Save wesen/1231755 to your computer and use it in GitHub Desktop.
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 <Ethernet.h> | |
| byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; | |
| byte ip[] = { 10, 0, 0, 177 }; | |
| byte gateway[] = { 10, 0, 0, 1 }; | |
| byte subnet[] = { 255, 255, 0, 0 }; | |
| Server server = Server(23); | |
| void setup() { | |
| Ethernet.begin(mac, ip, gateway, subnet); | |
| server.begin(); | |
| } | |
| void loop() | |
| { | |
| Client client = server.available(); | |
| if (client == true) { | |
| byte v = client.read(); | |
| analogWrite(9, v); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment