(basic) problem with the ethernet shield

hi all,

today i received an ethernet shield, and i tried the two examples ChatServer and WebServer, which work well.
then i wrote a little script on my own, which surprisingly doesn't work.
maybe there is something very basicly wrong with my code.

here's a description of what it does:

  • it sets a led (13) for output
  • it starts a server on port 6606
  • it opens Serial for debugging

when a client connects, it waits for data with client.available()
then a switch:
if it's a 's', set the LED and reply on socket and serial
if it's a 'c', clear the LED, as above
if it's a 'q', quit the client

in principle this works, i can see the debug messages and the responses on the socket.
but the led is half lit all the time, it seems as if it's turned on an off be something else.

in fact, there's a quite hight frequency on pin13.

i have also tried the digital/blink example, it works fine.
(i have tried it with the ethernet shield connected).

does anybody have a hint? something with interrupts maybe?

of course i can provide the code..

-t

i probably already found the answer. RFTM!
http://arduino.cc/en/Main/ArduinoEthernetShield says it clearly that pins 10 to 13 (SPI) cannot be used, because the shield uses them for communication.

this seems to become a monologue..

on my board, also pins 8 and 9 behave a bit strange, although they should not be used by the ethernet shield.
i can make a led blink, but something resets it immediately afterwards.

can somebody confirm this?

on my board, also pins 8 and 9 behave a bit strange, although they should not be used by the ethernet shield.
i can make a led blink, but something resets it immediately afterwards.

can somebody confirm this?

Yes, known problem. I think it'll be fixed in the next release.

Stay away from pins 10,11,12,13 because the shield uses them. Stay away from 8 and 9 until you upgrade to arduino 0013 (which has not been released yet).

-j