App inventor BPM direct texting

help me plz !

This is bpm count app inventor.
I want direct texting ( if BPM <= 75 or >= 140)

plz help me!!!
I cant

Difficult to follow your code - why do you have two timers calling Bluetooth comms?

In both, use math Block '-1' to get all bytes available.

Are you using an Arduino? We need to see your Sketch (post here with .txt file extension)

1 Like

Can you just change the .ino to .txt and upload the file please.

1 Like

bpm .txt (3.0 KB)

Use one Clock Timer for data collection, like this (Note DelimiterByte in Initialisation


):

1 Like

Thank you. I'll try it !

In your Sketch, add line 107 thus:

      Serial.print(reading);
      Serial.print("\n");
      BTSerial.print(reading);
      BTSerial.println(); // ***** App end of data *****

      Serial.flush();

      delay(6000); //Must be approx 20% longer time interval than App.
1 Like

I am away from my desk now until late evening UK Time. Good luck!

1 Like

thank you. i do love you

Let us know how your Project goes.

1 Like

I can't see the bpm on the app.

What microcontroller are you using? For example, Arduino UNO?

Also, what is the make and model of your Android device (Smartphone)?

What is your Android version?

I use Arduino Uno and Galaxy phone.

The details are important!

1 Like

The Samsung Galaxy S20+ and Android version is 12.

Look:

..and (Edited image):

Your Android Version has extra Google Android security measures. Before running the App, switch on Bluetooth and also switch on Location.

1 Like

What is the Bluetooth Module you are using on your UNO? I notice you are using pins 2 and 3 - that may be OK but it is more common to use pins 10 and 11 for Bluetooth.

In your Sketch, you assign Software Serial to pins 2 and 3, but in the Setup() you define pin modes as 10 and 11.

Try this updated Sketch:
bpm2.txt (3.1 KB)

1 Like

Very late here (03:10am) so I'm shutting down :grin:

I think you should be OK now, let me know how you get on, good or bad.

1 Like

Thank you for everything. I'll give it a try. Thank you for your help!

Thank you very much. I modified the app inventer a little bit and it works so well. I admire you.

1 Like