-
-
Save Elwell/9600987df86ac7d96812 to your computer and use it in GitHub Desktop.
nanode uip
This file contains 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 <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() { |
This file contains 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
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