Tutorial.ChatServer History

Hide minor edits - Show changes to output

November 28, 2011, at 04:31 PM by Scott Fitzgerald -
Changed line 37 from:
(:source http://arduino.cc/en/pub/code/0023/libraries/Ethernet/examples/ChatServer/ChatServer.pde lang=arduino tabwidth=4:)
to:
(:source http://arduino.cc/en/pub/code/master/libraries/Ethernet/examples/ChatServer/ChatServer.ino lang=arduino tabwidth=4:)
November 16, 2011, at 05:11 AM by Scott Fitzgerald -
Changed line 37 from:
(:source http://arduino.cc/en/pub/code/master/libraries/Ethernet/examples/ChatServer/ChatServer.ino lang=arduino tabwidth=4:)
to:
(:source http://arduino.cc/en/pub/code/0023/libraries/Ethernet/examples/ChatServer/ChatServer.pde lang=arduino tabwidth=4:)
November 16, 2011, at 04:27 AM by Scott Fitzgerald -
Changed line 37 from:
(:source http://arduino.cc/en/pub/code/master/libraries/Ethernet/examples/ChatServer/ChatServer.pde lang=arduino tabwidth=4:)
to:
(:source http://arduino.cc/en/pub/code/master/libraries/Ethernet/examples/ChatServer/ChatServer.ino lang=arduino tabwidth=4:)
September 23, 2010, at 05:06 AM by Christian Cerrito -
Changed lines 43-44 from:
(:include EthernetSeeAlsoIncludes :)
to:
(:include EthernetSeeAlsoIncludes :)
September 17, 2010, at 04:35 PM by Tom Igoe -
Changed lines 43-52 from:
* [[Main/ArduinoEthernetShield | Arduino Ethernet Shield]]
* [[Guide/ArduinoEthernetShield | Getting started with the ethernet shield]]
* [[Reference/Ethernet | Ethernet library]]
* [[ChatServer]]
* [[WebClient]]
* [[WebServer]]
* [[PachubeCient]]
* [[BarometricPressureWebServer]]
* [[UDPSendReceiveString]]
* [[UdpNtpClient]]
to:
(:include EthernetSeeAlsoIncludes :)
September 17, 2010, at 04:32 PM by Tom Igoe -
Changed lines 50-51 from:
* [[TwitterClient]]
*[[BarometricPressureWebServer]]
to:
* [[BarometricPressureWebServer]]
* [[UDPSendReceiveString]]
* [[UdpNtpClient]]
August 16, 2010, at 03:19 PM by Tom Igoe -
August 15, 2010, at 02:51 PM by Tom Igoe -
August 15, 2010, at 02:51 PM by Tom Igoe -
Changed line 29 from:
!!!Schematic
to:
!!!Schematic
August 15, 2010, at 03:53 AM by Christian Cerrito -
Changed lines 6-7 from:
A simple server that distributes any incoming messages to all connected clients. To use, open a terminal window, telnet to your devices IP address, and type away. Any incoming text will be sent to all connected clients (including the one typing). Additionally, you will be able to see the clients input in your serial monitor as well.
to:
A simple server that distributes any incoming messages to all connected clients. To use, open a terminal window, telnet to your devices IP address, and type away. Any incoming text will be sent to all connected clients (including the one typing). Additionally, you will be able to see the client's input in your serial monitor as well.
August 15, 2010, at 03:52 AM by Christian Cerrito -
Changed lines 6-7 from:
A simple server that distributes any incoming messages to all connected clients. To use, telnet to your devices IP address and type. Any incoming text will be sent to all connected clients (including the one typing). Additionally, you will be able to see the clients input in your serial monitor as well.
to:
A simple server that distributes any incoming messages to all connected clients. To use, open a terminal window, telnet to your devices IP address, and type away. Any incoming text will be sent to all connected clients (including the one typing). Additionally, you will be able to see the clients input in your serial monitor as well.
Changed line 34 from:
Describe what's going on here
to:
'''Code:'''
August 15, 2010, at 03:49 AM by Christian Cerrito -
Changed lines 6-7 from:
A simple server that distributes any incoming messages to all connected clients. To use telnet to 10.0.0.177 and type! Any incoming text will be sent to all connected clients (including the one typing).
to:
A simple server that distributes any incoming messages to all connected clients. To use, telnet to your devices IP address and type. Any incoming text will be sent to all connected clients (including the one typing). Additionally, you will be able to see the clients input in your serial monitor as well.
August 15, 2010, at 03:36 AM by Christian Cerrito -
Changed lines 25-26 from:
'''''In the above image, the Arduino would be connected below the Ethernet shield.'''''
to:
'''''In the above image, the Arduino would be stacked below the Ethernet shield.'''''
August 15, 2010, at 01:39 AM by Christian Cerrito -
Changed lines 25-26 from:
''''In the above image, the Arduino would be connected below the Ethernet shield.'''''
to:
'''''In the above image, the Arduino would be connected below the Ethernet shield.'''''
August 15, 2010, at 01:38 AM by Christian Cerrito -
August 14, 2010, at 10:02 PM by Christian Cerrito -
Added lines 25-26:
''''In the above image, the Arduino would be connected below the Ethernet shield.'''''
August 13, 2010, at 03:41 PM by Tom Igoe -
August 13, 2010, at 03:37 PM by Tom Igoe -
Changed lines 3-4 from:
!!Chat Server
to:
!!!Chat Server

Changed lines 8-45 from:
!!!!Circuit

An Arduino board with a [[Main/ArduinoEthernetShield | Arduino Ethernet Shield]]. The shield should be connected to a network with an ethernet cable. You will need to change the network settings in the program to correspond to your network.

!!!!Code

[@
#include <Ethernet.h>

// network configuration. gateway and subnet are optional.
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
byte ip[] = { 10, 0, 0, 177 };
byte gateway[] = { 10, 0, 0, 1 };
byte subnet[] = { 255, 255, 0, 0 };

// telnet defaults to port 23
Server server(23);

void setup()
{
// initialize the ethernet device
Ethernet.begin(mac, ip, gateway, subnet);

// start listening for clients
server.begin();
}

void loop()
{
Client client = server.available();
if (client) {
server.write(client.read());
}
}
@]

!!!!See also
to:
(:div class=BOM :)
!!!Hardware Required
Added lines 11-41:
* Shield-compatible Arduino board
(:divend:)

!!!Circuit
(:div class=circuit :)

The Ethernet shield allows you to connect a WizNet Ethernet controller to the Arduino via the SPI bus. It uses pins 10, 11, 12, and 13 for the SPI connection to the WizNet. Later models of the Ethernet shield also have an SD Card on board. Digital pin 4 is used to control the slave select pin on the SD card.

The shield should be connected to a network with an ethernet cable. You will need to change the network settings in the program to correspond to your network.

%height=300px%[[Attach:EthernetShield_bb.png | Attach:EthernetShieldF_bb.png]]

[-image developed using [[http://www.fritzing.org |Fritzing]]. For more circuit examples, see the [[http://fritzing.org/projects/|Fritzing project page]] -]

(:divend:)

!!!Schematic
(:div class=circuit :)
%height=300px%[[Attach:EthernetShield_sch.png | Attach:EthernetShield_sch.png]]
(:divend:)

Describe what's going on here

(:div class=code :)
(:source http://arduino.cc/en/pub/code/master/libraries/Ethernet/examples/ChatServer/ChatServer.pde lang=arduino tabwidth=4:)
(:divend:)


!!!See Also:

* [[Main/ArduinoEthernetShield | Arduino Ethernet Shield]]
August 13, 2010, at 03:35 PM by Tom Igoe -
Changed lines 47-53 from:
* [[Reference/Ethernet | Ethernet library]]
to:
* [[Reference/Ethernet | Ethernet library]]
* [[ChatServer]]
* [[WebClient]]
* [[WebServer]]
* [[PachubeCient]]
* [[TwitterClient]]
*[[BarometricPressureWebServer]]
November 01, 2008, at 02:42 PM by David A. Mellis -
Added lines 1-47:
''Examples > Ethernet Library''

!!Chat Server

A simple server that distributes any incoming messages to all connected clients. To use telnet to 10.0.0.177 and type! Any incoming text will be sent to all connected clients (including the one typing).

!!!!Circuit

An Arduino board with a [[Main/ArduinoEthernetShield | Arduino Ethernet Shield]]. The shield should be connected to a network with an ethernet cable. You will need to change the network settings in the program to correspond to your network.

!!!!Code

[@
#include <Ethernet.h>

// network configuration. gateway and subnet are optional.
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
byte ip[] = { 10, 0, 0, 177 };
byte gateway[] = { 10, 0, 0, 1 };
byte subnet[] = { 255, 255, 0, 0 };

// telnet defaults to port 23
Server server(23);

void setup()
{
// initialize the ethernet device
Ethernet.begin(mac, ip, gateway, subnet);

// start listening for clients
server.begin();
}

void loop()
{
Client client = server.available();
if (client) {
server.write(client.read());
}
}
@]

!!!!See also

* [[Main/ArduinoEthernetShield | Arduino Ethernet Shield]]
* [[Guide/ArduinoEthernetShield | Getting started with the ethernet shield]]
* [[Reference/Ethernet | Ethernet library]]

Share