Go Down

Topic: Serial.available() returns nothing on Atmega1280 (arduino mega) (Read 923 times) previous topic - next topic

Osias Neto

Quote
And if you disconnect this debugging Arduino?

Nothing changes :/

Osias Neto

#6
Jan 25, 2012, 01:53 pm Last Edit: Jan 25, 2012, 06:50 pm by Osias Neto Reason: 1
I just try it:
Code: [Select]

if (Serial2.available()>0)
{
  Serial.print( Serial2.read());
  Serial.print("c");
}

else
{
  Serial.print("a");
  Serial2.print("b");
}

I'm receiving nothing on Serial Monitor, so Serial.print is not working too!

Any idea?

Osias Neto

I found the problem! I didn't know is required pull ups on these lines, only a noob mistake :P

Thanks for help

Nick Gammon

I didn't know that either. Mind you, my test worked. Still, glad it works for you. :)

Go Up