Arduino Uno Quick Start Manual page 195

Hide thumbs Also See for Arduino Uno:
Table of Contents

Advertisement

More Fun with Networking Arduinos
Wearables and e-textiles are getting more and more popular, and they re still a good
way to impress your colleagues and friends. Different types of interactive T-shirts are
available in every well-stocked geek shop. Some of them show the current Wi-Fi
strength, while others come with a full-blown built-in electronic rock guitar.
With an Arduino LilyPad,
a T-shirt that displays the current number of unread emails in your inbox.
Not only can you show the number of unread email messages, you can also use the
LilyPad and an XBee module to teach children important information about bees and
c
their behavior.
a.
http://arduino.cc/en/Main/ArduinoBoardLilyPad
b.
http://blog.makezine.com/2010/03/30/email-counting-t-shirt/
c.
http://www.instructables.com/id/Interactive-Bee-Game/
Ethernet/TimeServerDnsDhcp/TimeServerDnsDhcp.ino
#include <SPI.h>
Line 1
#include <Ethernet.h>
-
-
const unsigned int
-
const unsigned int
5
-
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
-
char* time_server = "time.nist.gov";
-
EthernetClient client;
-
10
void
setup() {
-
Serial.begin(BAUD_RATE);
-
if
(Ethernet.begin(mac) == 0) {
-
for
(;;) {
-
Serial.println("Could not obtain an IP address using
15
delay(1000);
-
}
-
}
else
{
-
print_ip_address(Ethernet.localIP());
-
}
20
}
-
-
-
void
loop() {
-
delay(1000);
25
Serial.print("Connecting...");
-
if
(client.connect(time_server, DAYTIME_PORT) <= 0) {
-
Serial.println("connection
-
}
else
{
-
Serial.println("connected.");
30
a
a Bluetooth dongle, and an Android phone, you can build
BAUD_RATE = 9600;
DAYTIME_PORT = 13;
failed.");
www.it-ebooks.info
Chapter 10. Networking with Arduino
b
DHCP.");
178
report erratum
discuss

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Arduino Uno and is the answer not in the manual?

Table of Contents