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
#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);
}
}
#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);
}
}
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?
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...
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);