Changed initialization order of radio/eth to avoid problems.

This commit is contained in:
Henrik Ekblad
2015-01-11 20:20:56 +01:00
parent d6922e7501
commit afc1e01cba
@@ -83,14 +83,14 @@ int inputPos = 0;
void setup()
{
// Initialize gateway at maximum PA level, channel 70 and callback for write operations
gw.begin(RF24_PA_LEVEL_GW, RF24_CHANNEL, RF24_DATARATE, writeEthernet);
Ethernet.begin(mac, myIp);
// give the Ethernet interface a second to initialize
delay(1000);
// Initialize gateway at maximum PA level, channel 70 and callback for write operations
gw.begin(RF24_PA_LEVEL_GW, RF24_CHANNEL, RF24_DATARATE, writeEthernet);
// start listening for clients
server.begin();
}