Browse Source

Added netmask, DNS, and gateway to Arduino

Stephen Downward 3 years ago
parent
commit
c630528199
1 changed files with 4 additions and 1 deletions
  1. 4 1
      Robot.ino

+ 4 - 1
Robot.ino

@ -19,6 +19,9 @@ int noCommand = 0;
19 19
20 20
byte mac[] = {0x90,0xA2,0xDA,0x0E,0xCF,0xEA};
21 21
IPAddress IP(10,13,0,1);
22
IPAddress DNS(8,8,8,8);
23
IPAddress gateway(10,0,0,1);
24
IPAddress netmask(255,0,0,0);
22 25
23 26
24 27
EthernetServer server(97);
@ -32,7 +35,7 @@ int delayTime = 250; //In ms
32 35
void setup()
33 36
{
34 37
  Serial.begin(9600);
35
  Ethernet.begin(mac,IP);
38
  Ethernet.begin(mac, IP, DNS, gateway, netmask);
36 39
  //Left motor init
37 40
  pinMode(leftMotorL_PWM, OUTPUT);
38 41
  pinMode(leftMotorR_PWM, OUTPUT);