Digital stethoscope

So I'm making a digital stethoscope using arduino and microphone max9814 and bleutooth HC _05
And I need and app to receive value and chart
I'm using this code :
#include <SoftwareSerial.h>

int SoundSensor=A0;
int LED13=13;
int Signal;
int Threshold=250;
int S;

SoftwareSerial mySerial (0,1);

void setup()
{
pinMode(LED13,OUTPUT);
Serial.begin(9600);
}

void loop ()
{
Signal = analogRead(SoundSensor);
S=(Signal/8);
Serial.print("Your heart beat is: ");
Serial.println(S);
mySerial.println(S);
if(Signal > Threshold)
{
digitalWrite(LED13, HIGH);
}
else
{
digitalWrite(LED13, LOW);
}
delay(1000);
}
I tried to do bleutooth block but it never show the bleutooth to connect

You need to ask for permission before scanning for devices.

I tried it and I get this

(Canned Response)
These blocks can be dragged into your Blocks Editor to request permission(s) for Bluetooth scanning and connecting. All three parts are needed.




Thanks to @Anke for the original code.
My changes include

  • use of the Screen1 permission blocks to avoid the possibility of a typo
  • using a TinyDB tag particular to BT permissions and only for BT permissions.
1 Like