Data are going bad

I am making project with Arduino NANO, Bluetooth module(RX and RT not yet connected), RTC DS3221 and a lot of RGB diodes.
I was not testing before soldering.

I am facing this bad readings on Serial monitor and don know why.

When I send these colors to the diodes they are also wrong. So something is wrong whit data in Arduino I think.

is the serial monitor bit rate the same as set in Serial.begin()

If you think on this 9600, I used it before, it worked fine.

But these data are not wrong only on Serial.monitor, they are wrong also when I send them on diodes…

If you’re sure the serial is all configured properly…
How about your CPU clock frequency… the default is 16MHz… did you underclock it in your code?

Try setting the serial terminal (not your code) to 4800… that will compensate for the slower clock on the chip.

Look here
http://www.asciitable.com/
You are trying to print basically non-printable characters for the variables Red, Green, Blue.

I found problem.

About Serial, I made a mistake and used wrong baut, when I put it to 9600 it worked.

About diodes, It changes this values in this part of code. Based on what it gets from Bluetooth. And while RX and RT are not connected yet and I am not sending anything on Bluetooth, it still change values. When I put // it worked fine.

I will check these tomorrow, thanks for help!

I fixed the problem, I didn’t put 9600 on Serial at first, it prints numbers fine now.

Thanks for help.

technically it’s not “baud” which is the symbol rate, it’s the bit rate.

if you’re old enough to know about 1200, 9600, 56k bps modems, they were all 1200 baud. a symbol in a 9600 bps modem conveys 3- bits

the baud rate of today’s 4G phones is only 10,000

1 Like

@gcjr, I tried explaining this a couple of years ago… deaf ears ! :+1::australia::heavy_check_mark:

Try explaining symbol rate, bps, baud etc… it’s ‘too hard’ !

Either way, the 1990s called and they want their baud (bit) rate back.

1 Like

Wait until you get to explaingin 5-bt baudot characters

see # Connecting Arduino Uno to Vietnam War teletype