Hardware Reference
In-Depth Information
//Add additional forms forms for controlling more things here.
sentHeader = true;
}
if (c == '\n' && currentLineIsBlank) break;
if (c == '\n')
{
currentLineIsBlank = true;
}
else if (c != '\r')
{
currentLineIsBlank = false;
}
}
}
delay(5); //Give the web browser time to receive the data
client.stop(); //Close the connection:
}
}
This code executes all the functionality that was described in the previous
sections. Be sure to change the MAC address listed in this code to the MAC
address printed on the sticker on your Arduino shield. If you cannot locate that
address, it may still work with the wrong address; you can use the one that is
already listed in the code. Load it on to your Arduino and launch the serial
monitor. Ensure that your Arduino is plugged into your network and that your
router has DHCP enabled (most do). After a few seconds, the DHCP connection
should succeed, and you will see a message that informs you of the IP address
that it has been assigned (see FigureĀ 14-4).
Figure 14-4: DHCP IP acquisition confirmation via serial
Search WWH ::




Custom Search