This simple code causes my Arduino Uno to continuously transmit data (TX led alway on) unless I open a serial monitor (it doesn't matter if I use the one in the Arduino IDE or a simple python program) right after upload (then everything works as wanted).Once the Arduino is in this "stall" I am unable to make any serial connection nor am I able to upload any new program. It is also somehow random if I am able to open the serial monitor, sometimes tabbing between windows in Ubuntu helps (which is really confusing).Switching to a Duemilanove resolved all issues but this can't be the resolution :-( .

It's your Arduino connected via USB to the computer? If this is true I think I have the same problem. I think Serial library work with TX and RX pins, the same pins than the USB port. I think we can use RX and TX if we are connected to the PC with the USB.

I change my code and work with pin 2 =RX and 3=TX and work with SoftwareSerial.h library. Something like:

void loop() { // listen for new serial coming in: char someChar = mySerial.read(); // print out the character: mySerial.print(someChar); // toggle an LED just so you see the thing's alive. // this LED will go on with every OTHER character received: toggle(13);

}

void toggle(int pinNum) { // set the LED pin using the pinState variable: digitalWrite(pinNum, pinState); // if pinState = 0, set it to 1, and vice versa: pinState = !pinState;}

The only way I see to load the same program on RX,TX pins is disconnect the RX,TX cable from the Arduino board, load the program and connect the RX,TX another time and finally reset the board to execute another time the setup.

meru: you should be able to upload new programs to the Arduino by holding down the reset button for a few seconds, or holding down the reset button while you connect the board to the computer. It's not such an elegant solution, but maybe it's a work-around while we look for a better solution?

Ok, I'm totally lost now: you just said you redefined pins 2 and 3 to use them as alternative TX/RX rather than 0 and 1, and that you connect them to PC USB.... and now you say it is not possibile?!? :-?

and I told you.Now you are asking about alternative TX/RX . The answer to that one is simpler.1) Have you got a serial port on the PC - Yes use a MAX202 to connect it up - if no the go to 2:-2) Get a serial port on your PC by a USB to RS232 serial adaptor cable and go back to 1.

OR

3) Get a USB to serial TTL adaptor and wire that directly to the arduino.

and I told you.Now you are asking about alternative TX/RX . The answer to that one is simpler.1) Have you got a serial port on the PC - Yes use a MAX202 to connect it up - if no the go to 2:-2) Get a serial port on your PC by a USB to RS232 serial adaptor cable and go back to 1.

I was talking abut these TX/RX pins!!! Since the beginning!!

#define rxPin 2#define txPin 3

And anyway I don't actually need to connect Arduino to PC again, besides USB: I'm interested on using TX/RX pins to connect Arduino to serial-controlled devices, and I can't find any MAX232 in electronic shops here around.

And anyway I don't actually need to connect Arduino to PC again, besides USB: I'm interested on using TX/RX pins to connect Arduino to serial-controlled devices, and I can't find any MAX232 in electronic shops here around.

Pins 2 and 3 are NOT TX and RX pins. They are general purpose IO pins that some software is using to emulate serial data transmission via the TX/RX pins. So, don't go getting all snooty when you say one thing and mean another.

Pins 2 and 3 are NOT TX and RX pins. They are general purpose IO pins that some software is using to emulate serial data transmission via the TX/RX pins. So, don't go getting all snooty when you say one thing and mean another.

Do you THINK? (facepalm)

(You needed just a dozen of posts to understand what I am talking about.)