Connecting keypad to an app and sending input data through Bluetooth


I've successfully developed an app that establishes a Bluetooth connection between a phone and an Arduino Uno equipped with an HC-05 module. The app is designed to receive input data from a keypad. While the Bluetooth connection is functioning properly, I'm encountering an issue where the input data from the keypad is not displaying within the application on the phone. However, I can confirm that the input data is being transmitted and received by the Arduino Uno, as it is visible in the Serial Monitor of the Arduino IDE.

To troubleshoot this issue, I would appreciate any guidance or suggestions on how to ensure that the input data from the keypad is properly displayed within the mobile application. Thank you for your assistance.

We need to see your Uno Sketch.

A number of things on the App side:

Receive should be thus to receive all data:

Are you only receiving a single value per Clock1 cycle?

In screen initialize, set Clock1 timer duration to be 20% shorter than the duration of the Sketch loop - make the Sketch loop duration as long as is acceptable for the goal of the project.

In screen initialize, Set the delimiter value (usually ASCII 10 = end-of-line = \n in the Sketch).

Depending on your version of Android on your App Device (phone), you may need to ask for Security permissions - there is plenty of information on the forum but note you are using Classic BT, permissions for BLE do not apply to your project.

Make sure that both devices have Bluetooth switched on and the App Device has Location switched on. Depending on your version of Android, you may need to go to Settings to allow Bluetooth connections.

You may also need to set the scan for devices and the connection to the chosen device in Clock Timer Blocks as both of these can require a bit of time.

This is my Uno Sketch:
#include <Key.h>
#include <Keypad.h>

const byte ROWS = 4; //four rows
const byte COLS = 4; //four columns

char hexaKeys[ROWS][COLS] = {
{'1', '2', '3', 'A'},
{'4', '5', '6', 'B'},
{'7', '8', '9', 'C'},
{'*', '0', '#', 'D'}

byte rowPins[ROWS] = {9, 8, 7, 6}; //connect to the row pinouts of the keypad
byte colPins[COLS] = {5, 4, 3, 2}; //connect to the column pinouts of the keypad

Keypad keypad = Keypad(makeKeymap(hexaKeys), rowPins, colPins, ROWS, COLS);

void setup() {
Serial.begin(9600); // Use the hardware serial for communication

void loop() {
char key = keypad.getKey();
if (key) // We press a key on the keyboard
Serial.println(key); // Send message to smartphone

OK, this is wrong:




... and you haven't incorporated my previous comments in your Blocks.