Skip to content

Instantly share code, notes, and snippets.

@Elwell
Created May 11, 2014 13:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Elwell/9600987df86ac7d96812 to your computer and use it in GitHub Desktop.
Save Elwell/9600987df86ac7d96812 to your computer and use it in GitHub Desktop.
nanode uip
#include <UIPEthernet.h>
EthernetClient client;
signed long next;
int led = 6;
void setup() {
pinMode(led, OUTPUT);
digitalWrite(led, HIGH);
Serial.begin(115200);
// MAC address grabbed from NanodeMac earlier
uint8_t mac[6] = {0x00,0x04,0xA3,0x2C,0x1D,0xE1};
Ethernet.begin(mac, 8);
//Serial.print("Mac Addr: ");
//Serial.println(mac);
// dammit, the above needs iterating through to work
Serial.print("localIP: ");
Serial.println(Ethernet.localIP());
Serial.print("subnetMask: ");
Serial.println(Ethernet.subnetMask());
Serial.print("gatewayIP: ");
Serial.println(Ethernet.gatewayIP());
Serial.print("dnsServerIP: ");
Serial.println(Ethernet.dnsServerIP());
next = 0;
digitalWrite(led, LOW);
}
void loop() {
localIP: 8.0.0.0
subnetMask: 255.255.255.0
gatewayIP: 8.0.0.1
dnsServerIP: 8.0.0.1
Client connect
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment