Serial monitor showing unreadable characters

I'm working on a project that uses the keypad shield from 1sheeld app to send IR signals , Everything was done correctly but the project gave 0 results so I tested the IR Led and it was functional so I moved to test the 1sheeld keypad shield using the code below but the serial monitor shown unreadable characters even though the baud rate is the same in the code as in the serial monitor .
One more thing is that I cannot upload the sketch when the 1sheeld is connected to the arduino uno board , is that okay ?
Help please :pensive: :pray:

#include <OneSheeld.h>

void setup() {
  // Start serial communication
  Serial.begin(9600);

  // Start communication with 1Sheeld
  OneSheeld.begin();

  // Enable the Keypad Shield
  Keypad.setOnButtonChange(&onButtonChange);
}

void loop() {
  // Do nothing in the loop
}

// Function called when a button is pressed on the Keypad Shield
void onButtonChange(byte row, byte col, boolean pressed) {
  if (pressed) {
    // Print the button's row and column to the Serial Monitor
    Serial.print("Button pressed: ");
    Serial.print(row);
    Serial.print(",");
    Serial.println(col);
  }
}

try this

#include <OneSheeld.h>

void setup() {
  // Start serial communication
  Serial.begin(9600);

  // Start communication with 1Sheeld
  OneSheeld.begin();

  // Enable the Keypad Shield
  Keypad.setOnButtonChange(&onButtonChange);
}

void loop() {
  // Do nothing in the loop
}

// Function called when a button is pressed on the Keypad Shield
void onButtonChange(byte row, byte col, boolean pressed) {
  if (pressed) {
    // Print the button's row and column to the Serial Monitor
    Serial.print("Button pressed: ");
    Serial.print(row,DEC);
    Serial.print(",");
    Serial.println(col,DEC);
  }
}

Same results , here's a screenshot
Capture

so, shield make every message corrupted

Does that mean the shield is damaged ?

i know nothing about developers of this strange piece. did you ask them about it? it could be it's feature to destroy USB communication.
how much you pay for it?

Around 70 dollars

cool. in my country 55$

Although I think it does not even worth 10$

my words

It happens if the Arduino frequency and the "presumed frequency" don't match. Try other baud rates (on one side only) to make sure, specially x2, x4 or /2, /4...

No. That means the shield is doing something with the Serial pins (0 and 1). That could easily explain unreadable characters.

How can I fix that ?

Cut pins 0 and 1 off the shield.

No need for any cutting, there is a switch to perform the disconnection.

Put the switch in the other position to upload

That fixed the uploading problem thank you , but why is the serial monitor showing non readable characters ?

Because you have chosen the wrong Baud rate.

  // Start serial communication
  Serial.begin(9600);

All the documentation that I have seen indicates that the 1Sheeld is running at 115200Bd.
For Example;

Technical Details
Uses Bluetooth LE with range up to 30 feet
Running on an Atmel ATMega162 @ 7.37 MHz
Communicates with Arduino using UART
Communication baud rate 115,200 b/s

Try changing your Baud rate to 115200Bd.

 // Start serial communication
  Serial.begin(115200);
1 Like

That solved the whole problem really thank you :pray: :pray:

1 Like

abderrahmen99

I'm glad to hear that your issues are solved.

Just stick to 115200Bd whenever you use your 1Sheeld in future.

It looks to me as though the Baud rate of the microcontroller on the 1Sheeld is 'fixed' at 115200Bd and you have to make your Arduino sketch match it.

1 Like

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