Arduino Mega Serial Issue

Hi All,

Hope you can help me, im trying to get into arduino to help my father out with a few projects. I have worked on projects with Propeller, picaxe, basic stamp etc, but not much experience with arduino.

I have an arduino mega. I was trying to run i2c_scanner on it, but when I open the serial monitor I just get a constant stream of zero's (1 per line). The baud rate is matched to that in the code, and I have tried both com ports. I do not get any errors when compiling and I have the mega selected as the board.

I also tried running the code from here with the same result.

http://arduinobasics.blogspot.co.uk/2012/07/arduino-basics-simple-arduino-serial.html

Im sure it's something simple that I am missing, but don't know what, could not find anything on google.

Thanks

It is not simple, because I don’t know what it is … :stuck_out_tongue:
The thing is: the serial port is also used to upload the sketch. If uploading works, the serial port is working.

Is it a recent official Arduino Mega 2560 board, version ‘R3’ ?
Do you use Arduino IDE 1.0.6 or 1.5.7 ?

Can you try the led Blink example ? Change the blink rate, and check that it really did change.

Disconnect everything from the Mega board. Connect only the usb to the computer.
Upload the i2c_scanner or that serial echo sketch you mentioned and open the serial monitor of the Arduino IDE
Still not working → that is very bad, try another computer. Same result → get another Arduino board → still zero’s ? → you are in a parallel universe, get out of there.

djh82uk: Hi All,

Hope you can help me, im trying to get into arduino to help my father out with a few projects. I have worked on projects with Propeller, picaxe, basic stamp etc, but not much experience with arduino.

I have an arduino mega. I was trying to run i2c_scanner on it, but when I open the serial monitor I just get a constant stream of zero's (1 per line). The baud rate is matched to that in the code, and I have tried both com ports. I do not get any errors when compiling and I have the mega selected as the board.

Does it say "Done uploading." when you have finished uploading the sketch to the board?

Ok, it does say "done uploading" after uploading the sketch. I am using v1.06 of the ide.

I have just the mega attached (main chip says it is an Atmega1280 so I selected "Mega 1280" as the board) via USB and nothing else plugged in.

My PC is showing two com ports since installing the arduino software, they are COM1 - Communications Port and COM6 - USB Serial Port.

I can upload to either without error (done compiling). Running the serial monitor on COm1 shows nothing with I2C_scanner uploaded.

Com6 is the one that shows all the zeros, regardless of whether I upload the blink example or the i2cscanner.

Going to try another PC now.

Thanks

DJH

Got it working on another PC. Reinstalled the USB driver and IDE on the original PC and that is now working too :slight_smile:

It seems it was lying when it said it had uploaded. The TX light on the board was lit constantly.

Thanks for the help guys, already got my i2c lcd up and running :slight_smile:

Bad luck :( I was hoping to communicate with someone in a parallel universe. Just kidding XD I'm glad you have it working.

djh82uk: It seems it was lying when it said it had uploaded. The TX light on the board was lit constantly.

Sometimes my Leonardo upload fails like that. I watch the lights flicker and if they don't do it in the usual way, I don't believe it when it says it is done.

djh82uk:
Got it working on another PC. Reinstalled the USB driver and IDE on the original PC and that is now working too :slight_smile:

It seems it was lying when it said it had uploaded. The TX light on the board was lit constantly.

Thanks for the help guys, already got my i2c lcd up and running :slight_smile:

Compiling is not uploading. Uploading is uploading. You can compile without any arduino attached to your PC. If you remove your arduino from PC, which COM port disappears from your port list? That should tell you which port has the MEGA on it. There is no reason you have to “try to open both ports”. I recommend you get a MEGA2560 R3. The MEGA1280 board has numerous problems that you don’t want to deal with in the future. When you are more familiar with arduinos, you can decide what to do with it. As for myself, I use mine to routinely set up real time clocks on shields I build and sell. It only does that one thing now.