forked from embeddedartistry/athena-bootloader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathReadNetworkSettings.ino
36 lines (31 loc) · 940 Bytes
/
ReadNetworkSettings.ino
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/*
* ReadNetworkSettings
*
* This library uses the NetEEPROM and NewEEPROM libraries to read the
* network settings used by the Ariadne bootloader and EthernetReset server.
*/
#include <NewEEPROM.h>
#include <NetEEPROM.h>
void setup()
{
// Initialize serial and wait for port to open:
Serial.begin(115200);
/* Wait for serial port to connect. Needed for Leonardo only
* but breaks compilation on Arduino 1.0. Leonardo is not
* supported by the bootloader yet */
while(!Serial)
{
delay(10);
}
/* Print the network settings to serial */
NetEEPROM.printAll(&Serial);
/* If you want to invalidate the image after first run, uncomment this
* Because Duemilanove doesn't have auto-reset, don't uncomment this or
* you will invalidate the image before you open the serial console */
//NetEEPROM.WriteImgBad();
Serial.println("Settings read, you can now upload another sketch.");
}
void loop()
{
delay(500);
}