Hardware Reference
In-Depth Information
clients. A server waits for connections from remote
devices on the Internet and allows them to connect to
the Ethernet module, just like regular servers. A client
initiates a connection to remote devices, makes requests,
and delivers the replies, just like a regular client. Both
servers and clients can be read from and written to, using
the read() , write() , print() , and println() commands that
you've already seen with the Serial library. There's also
an available() command, as in the Serial library, to see
whether there's any new data available from the server or
client in question. The client object also has a connected()
command that tells you whether it's connected to a
remote server. This will be useful later, when you're trying
to connect to a remote server to get data. Here, you'll get
started with a simple server sketch.
LINK
- +
ETHERNET
SHIELD
L
1
5
10
15
20
25
30
RX
A
B
C
D
E
ON
100M
MADE IN ITALY
WWW.ARDUINO.CC
ICSP
F
G
H
I
J
1
5
10
15
20
25
30
AREF
GND
D13
D12
D11/PWM
D10/PWM
D9/PWM
D8
Figure 4-4
The RGB server circuit. The connections are the
same for either the Arduino Ethernet or the Arduino
and Ethernet shield combo. Note the three color
filters over the photocells.
Reset
+3.3V
+5V
Gnd
Gnd
Vin
+5V
200K photocell
Arduino
Module
10K
D7
D6/PWM
D5/PWM
D4
D3/PWM
D2
Digital1/TX
Digital0/RX
200K photocell
Analog0
A1
A2
A3
A4
A5
10K
200K photocell
10K
Search WWH ::




Custom Search