White screen when i press on start button

Newon1Screen2 (2).aia (13.9 KB)

This version has all 3 screens visible, with a debug label at the top.

Now show us what that incoming data looks like.

1 Like

okay so when i connect bluetooth and press start button , it takes me to the alert history page where a black plain canvas appears, under it there is the export data and back buttons , but they dont work , also i guess that in the black space the heatmap shoul appear but it didnt , and also text for label 1 is appearing on top of the screens

also note that the lcd is only turning blu and not written anything on it , but befoe it worked , idont know if te problem is from the arduino code or not

is there anything else u need to know?

1 Like

let me know

1 Like

It helps to get a Serial Bluetooth Terminal app from the Play store to debug the sketch separately from the app.

Get one, and show us from it what the incoming data stream looks like.

1 Like

the problem isnt from the bluetooh ccuz it already connected , why is it not showing the heat mp and why are the buttons not presing ? also do u think that this arduino code is better ? #include <Wire.h>
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27, 16, 2);

// 9 FSR sensor pins
int fsrPins[9] = { A0, A1, A2, A3, A4, A5, A6, A7, A8 };

// Sensor values
int fsrValues[9];

// Threshold
int threshold = 60;

// Time threshold (10 seconds)
unsigned long startTime[9];
bool timerStarted[9];
bool alertSent[9];

// Buzzer pin
int buzzer = 8;

void setup() {

Serial.begin(9600);

lcd.init();
lcd.backlight();

pinMode(buzzer, OUTPUT);

lcd.setCursor(0, 0);
lcd.print("System Ready");

delay(2000);
lcd.clear();

// Initialize arrays
for (int i = 0; i < 9; i++) {

startTime[i] = 0;
timerStarted[i] = false;
alertSent[i] = false;
}
}

void loop() {

// Read all 9 sensors
for (int i = 0; i < 9; i++) {

fsrValues[i] = analogRead(fsrPins[i]);

// Print values on Serial Monitor
Serial.print("FSR ");
Serial.print(i + 1);
Serial.print(": ");
Serial.print(fsrValues[i]);
Serial.print(" ");

// Check high pressure
if (fsrValues[i] >= threshold) {

// Start timer
if (!timerStarted[i]) {

startTime[i] = millis();
timerStarted[i] = true;
}

// Check if pressure lasts 10 sec
if ((millis() - startTime[i] >= 10000) && !alertSent[i]) {

Serial.print(" ALERT on Sensor: Check patient 101B");
Serial.println(i + 1);

// Turn buzzer ON
digitalWrite(buzzer, HIGH);

// LCD alert
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("ALERT on Sensor");
lcd.setCursor(0, 1);
lcd.print(i + 1);

alertSent[i] = true;
}

} else {

// Reset if pressure removed
timerStarted[i] = false;
alertSent[i] = false;
}
}

// Turn buzzer OFF if no alerts
bool anyAlert = false;

for (int i = 0; i < 9; i++) {

if (alertSent[i]) {
anyAlert = true;
}
}

if (!anyAlert) {

digitalWrite(buzzer, LOW);

lcd.setCursor(0, 0);
lcd.print("Monitoring... ");
}

Serial.println();

delay(200);

1 Like

I am not an expert on Arduino code.

However, I know a data stream when I see one.

That's why i recommended a Serial Bluetooth Terminal app for debugging.

Do you need me to Google one for you?

1 Like

yes, but im not undertanding what should i do

excuse me im a beginner

1 Like

Use this to connect to your Arduino from your phone.

1 Like

okay on it

1 Like

i conected i from the serial app successfully, but when i entered the mit app and pressed connect they put error 507: unable to connect is the device turned on ?

1 Like

Use the serial bluetooth terminal alone, without the AI2 app.

1 Like

connected

1 Like

Do you see any incoming data?

1 Like

no i dont

1 Like

No point trying to debug the app if the Arduino isn't sending out Bluetooth data, right?

Time to describe your Arduino setup, for the benfit of our hardware people.

1 Like

This code is part of my bed sore prevention system, where I use 9 pressure sensors (FSRs) placed under a patient to monitor pressure distribution in real time.

The Arduino continuously reads all 9 sensors and checks if any area is under high pressure. If a sensor value goes above a set threshold (60), the system does not immediately trigger an alarm. Instead, it starts a timer for that specific sensor using millis().

If the pressure stays high for more than 10 seconds, the system assumes that this area is at risk of developing a bed sore.

At that point:

  • The buzzer turns ON as a local alert

  • The LCD shows which sensor/area is affected

  • And most importantly, the system sends this information to the MIT App Inventor mobile app via Bluetooth (HM-10 or HC-05 module)

The mobile app acts like a nurse monitoring dashboard. Once it receives the data from the Arduino, it:

  • Displays the patient status (for example: “Monitoring” or “Alert”)

  • Shows which body area is under high pressure

  • And triggers a notification/alert to the nurse, so they can respond immediately and reposition the patient

Each sensor works independently, so the app can show exactly which part of the patient is in danger, not just a general warning.

If the pressure is removed before 10 seconds, everything resets automatically and no alert is sent.

Finally, when no risk is detected, the system stays in normal monitoring mode, and the app continues to show live updates.

So overall, the system combines:

  • Hardware sensing (FSR sensors)

  • Local alerts (buzzer + LCD)

  • Wireless communication (Bluetooth)

  • Mobile monitoring (MIT App Inventor app)

This makes it a real-time smart bed sore prevention system that helps nurses react faster and prevent ulcers before they form.

this is the code btw

#include <Wire.h>
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27, 16, 2);

// 9 FSR sensor pins
int fsrPins\[9\] = { A0, A1, A2, A3, A4, A5, A6, A7, A8 };

// Sensor values
int fsrValues\[9\];

// Threshold
int threshold = 60;

// Time threshold (10 seconds)
unsigned long startTime\[9\];
bool timerStarted\[9\];
bool alertSent\[9\];

// Buzzer pin
int buzzer = 8;

void setup() {

Serial.begin(9600);

lcd.init();
lcd.backlight();

pinMode(buzzer, OUTPUT);

lcd.setCursor(0, 0);
lcd.print("System Ready");

delay(2000);
lcd.clear();

// Initialize arrays
for (int i = 0; i < 9; i++) {

startTime\[i\] = 0;
timerStarted\[i\] = false;
alertSent\[i\] = false;
}
}

void loop() {

// Read all 9 sensors
for (int i = 0; i < 9; i++) {

fsrValues\[i\] = analogRead(fsrPins\[i\]);

// Print values on Serial Monitor
Serial.print("FSR ");
Serial.print(i + 1);
Serial.print(": ");
Serial.print(fsrValues\[i\]);
Serial.print(" ");

// Check high pressure
if (fsrValues\[i\] >= threshold) {

// Start timer
if (!timerStarted\[i\]) {

startTime\[i\] = millis();
timerStarted\[i\] = true;
}

// Check if pressure lasts 10 sec
if ((millis() - startTime\[i\] >= 10000) && !alertSent\[i\]) {

Serial.print(" ALERT on Sensor: Check patient 101B");
Serial.println(i + 1);

// Turn buzzer ON
digitalWrite(buzzer, HIGH);

// LCD alert
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("ALERT on Sensor");
lcd.setCursor(0, 1);
lcd.print(i + 1);

alertSent\[i\] = true;
}

} else {

// Reset if pressure removed
timerStarted\[i\] = false;
alertSent\[i\] = false;
}
}

// Turn buzzer OFF if no alerts
bool anyAlert = false;

for (int i = 0; i < 9; i++) {

if (alertSent\[i\]) {
anyAlert = true;
}
}

if (!anyAlert) {

digitalWrite(buzzer, LOW);

lcd.setCursor(0, 0);
lcd.print("Monitoring... ");
}

Serial.println();

delay(200);

(I added ``` for code formatting - ABG)

Usually, Arduino Bluetooth projects have two Serial data streams, one for the device console and one for transmission out through Bluetooth.

I only see the first of the two.

how do i fix it

Like I said, I am not an Arduino expert.

But your description mentioned HM-10, so I'll throw in this FAQ for you:

It would be helpful for you to include a circuit diagram for the hardware people on this board.

I'll tag a few of them, in case any are awake and onlike.
@uskiara

@ChrisWard

They are in Europe.

P.S. It would also be helpful to know if your device hardware is BLE or plain Bluetooth.
That makes a difference on the AI2 side.