Arduino Nano - Communication gibberish bluetooth and sometimes usb serial

Hi Folks.

I clicked through a few threads but wasn't able to find a solution to my problem, maybe its simple to solve.

I use Arduinos to add animated lighting to plastic or resin model kits, currently i am working on a new model - the USS Defiant from Star Trek - and reused the code i habe used in other models.
The Arduino is powered via LiPo and commands can be send to the Arduino via bluetooth (HC-05 module). The Loop section will be used to execute light sequences based on a switch function (case1 - warp drive, case2 impulse, etc.)

Now: i created a basic program, that will be further developed to include light animations, i overtook most of the program code from another sketch for another model, that is working perfectly fine. I use an Arduino Nano for this project.

But if i read the Serial Output from the Arduino it only sends back gibberish ( ⸮⸮⸮+ ⸮....etc). Same on the bluetooth serial monitor.
I tinkered around with in and found a somewhat special exception:
Via the usb Serial i can receive correct signals, but only with a Baud Rate set to 19200, although the serial is set to 9600 (?) in the sketch.
Via the Bluetooth serial I only receive gibberish, nevertheless of Baud Rate.

#include <SoftwareSerial.h>

const int rx_bt=13;
const int tx_bt=10;
const int Impuls=9;
const int Hull=2;
const int Strobe=4;
const int Deflector=3;
const int Nacelle_red=5;
const int Nacelle_blue=6;

SoftwareSerial Bluetooth(rx_bt, tx_bt);

void setup() {
  // put your setup code here, to run once:

delay (2000);

pinMode(Impuls, OUTPUT);
pinMode(Hull, OUTPUT);
pinMode(Strobe, OUTPUT);
pinMode(Deflector, OUTPUT);
pinMode(Nacelle_red, OUTPUT);
pinMode(Nacelle_blue, OUTPUT);

Bluetooth.println("Power up in progress. Standby.");
Serial.println("Power up in progress. Standby.");

delay (4000);
digitalWrite(Strobe, HIGH);
delay (100);
digitalWrite(Strobe, LOW);
delay (3200);
digitalWrite(Strobe, HIGH);
delay (100);
digitalWrite(Strobe, LOW);
delay (4500);

digitalWrite(Hull, HIGH);
delay (2600);

digitalWrite(Strobe, HIGH);
analogWrite(Impuls, 255);
digitalWrite(Deflector, HIGH);
digitalWrite(Nacelle_red, HIGH);
digitalWrite(Nacelle_blue, HIGH);


void loop() {
  // put your main code here, to run repeatedly:

If you’re sure all the bitrates match up, it’s worth looking at the CPU clock frequency.

E.g. If one of your processors is clocked at 8MHz, that will be operating at half speed unless you edited the core to match the new crystal or oscillator frequency.

Hmm. I use the same Nano Modell for all my projects.
How can i check the frequency exactly?

How can i check the frequency exactly?

To easily check for 16MHz or 8MHz, use a blink program with delay values of 30000 and use a watch to see if the timing is for 30 seconds or one minute.

Thx guys.

After I once more checked all settings, and reuploaded the script a few times suddenly it works. Lets hope for good.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.