Go Down

Topic: Garbage Values on Serial Monitor (Read 1 time) previous topic - next topic

robogroup6

Hi,

Recently purchased an Arduino Fio, and was trying out the Serial.print function.

However when I upload the program all it gives me on the serial monitor are garbage values.  My code is as follows:

void setup()
{
  Serial.begin(9600);
}
 
void loop()
{
  Serial.println("Hello World");
  delay(100);
}

Any ideas?  I have made sure that I have selected the correct board and com port, and the serial monitor is set to 9600 baud.

Thanks!

H

DCContrarian

I'm pretty sure the serial signal is inverted and you have to use a MAX232 chip to connect to a PC.

PaulS

How ARE you getting the serial data from the FIO to the PC?

robogroup6

What do you mean inverted?

Sorry I forgot to mention I am using two Xbee shields to wirelessly simulate a serial connection.

Thanks!

robogroup6


I'm pretty sure the serial signal is inverted and you have to use a MAX232 chip to connect to a PC.


I am not quite sure I understand what you are saying... are you suggesting that the serial signal is inverted due to a hardware problem?  Or a software setup that I have overlooked?

Is a MAX 232 chip necessary since I am using a pair of XBee shields to wirelessly communicate with the PC through ZigBee?

H

CrossRoads

The IDE serial monitor or something else?
If something else, is it also set to 8-N-1?
8 bits, no parity, 1 stop bit
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

robogroup6

Finally figured it out.  I was using a baud rate of 9600 (in the program), when I changed it to a baud rate to 57600 it worked.

Since the example programs all use a baud rate of 9600, how do I know when to change it to what baud rate?

H

CrossRoads

Guess you need to look every time. Take nothing for granted.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy