IRC Client

I am trying to port the IRC Idler from to the newer Arduino Software.
At the moment I still have one problem with compiling.
I am using the Arduino 1.5.5 software with and Arduino Uno with Ethernet Shield.
As far as I can see the problem is in the lines:

String data;
data =;

But I have no idea how I should change this part to solve the problem.
Can somebody please help me.

  Telnet client

This sketch connects to a a telnet server (
using an Arduino Wiznet Ethernet shield.  You'll need a telnet server
to test this with.
Processing's ChatServer example (part of the network library) works well,
running on port 10002. It can be found as part of the examples
in the Processing application, available at

* Ethernet shield attached to pins 10, 11, 12, 13

created 14 Sep 2010
modified 9 Apr 2012
by Tom Igoe


#include <SPI.h>
#include <Ethernet.h>

// Enter a MAC address and IP address for your controller below.
// The IP address will be dependent on your local network:
byte mac[] = {
  0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED
IPAddress ip(192, 168, 1, 177);

// Enter the IP address of the server you're connecting to:
IPAddress server(192, 168, 1, 1);

// Initialize the Ethernet client library
// with the IP address and port of the server
// that you want to connect to (port 23 is default for telnet;
// if you're using Processing's ChatServer, use  port 10002):

String chan = "#arduino";
String nick = "arduBot";
String join = "JOIN ";
String nickcmd = "NICK ";
String user = "USER ";
String pong = "PONG ";
//String data ;
// See more at:
EthernetClient client(6667);

void setup() {
  // start the Ethernet connection:
  Ethernet.begin(mac, ip);
  // Open serial communications and wait for port to open:
  while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only

  // give the Ethernet shield a second to initialize:

  // if you get a connection, report back via serial:
  if (client.connect(server, 10002)) {

  else {
    // if you didn't get a connection to the server:
    Serial.println("connection failed");

    void loop()
    if (client.available()) {
    String data;
    data =;
    if (!client.connected()) {

Error Message:

Arduino: 1.5.5 (Linux), Board: "Arduino Uno"

Using library SPI in folder: /home/kripke/arduino/hardware/arduino/avr/libraries/SPI (pre-1.5)
Using library Ethernet in folder: /home/kripke/arduino/libraries/Ethernet 

/home/kripke/arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=155 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/home/kripke/arduino/hardware/arduino/avr/cores/arduino -I/home/kripke/arduino/hardware/arduino/avr/variants/standard -I/home/kripke/arduino/hardware/arduino/avr/libraries/SPI -I/home/kripke/arduino/libraries/Ethernet/src -I/home/kripke/arduino/libraries/Ethernet/arch/avr /tmp/build8357157353389604704.tmp/sketch_feb13a.cpp -o /tmp/build8357157353389604704.tmp/sketch_feb13a.cpp.o 
sketch_feb13a.ino: In function ‘void loop()’:
sketch_feb13a.ino:86: error: ambiguous overload for ‘operator=’ in ‘data = client.EthernetClient::read()’
/home/kripke/arduino/hardware/arduino/avr/cores/arduino/WString.h:86: note: candidates are: String& String::operator=(const String&) <near match>
/home/kripke/arduino/hardware/arduino/avr/cores/arduino/WString.h:87: note:                 String& String::operator=(const char*) <near match>
/home/kripke/arduino/hardware/arduino/avr/cores/arduino/WString.h:88: note:                 String& String::operator=(const __FlashStringHelper*) <near match>

1.5.5 is a beta intended for Non-Uno. Why aren't you using 1.0.5?

Bugs can be reported here:

sorry I forgot to say the problem is the same with 1.05 and 1.5.5.

The old program I want to port is from before Arduino 1.0 with the older Ethernet Libraries.

As far as I can see the problem is in the lines:

String data;
data =;

But I have no idea how I should change this part to solve the problem.

Sure. First you tell us what the problem is. returns ONE character. Why do you need to waste all the resources needed to create a String instance that wraps a string to hold ONE character?