I am uploading this code, which i got from this tutorial http://www.instructables.com/id/Pulse-Sensor-With-Bluetooth-and-Arduino/, but I get this error message (below the sketch)
*/
//bluetooth
#include <SoftwareSerial.h>// import the serial library
SoftwareSerial Genotronex(10, 11); // RX, TX
int ledpin=12; // led on D13 will show blink on / off
int BluetoothData; // the data given from Computer
// Variables
int pulsePin = 0; // Pulse Sensor purple wire connected to analog pin 0
int blinkPin = 13; // pin to blink led at each beat
int fadePin = 5; // pin to do fancy classy fading blink at each beat
int fadeRate = 0; // used to fade LED on with PWM on fadePin
// Volatile Variables, used in the interrupt service routine!
volatile int BPM; // int that holds raw Analog in 0. updated every 2mS
volatile int Signal; // holds the incoming raw data
volatile int IBI = 600; // int that holds the time interval between beats! Must be seeded!
volatile boolean Pulse = false; // “True” when User’s live heartbeat is detected. “False” when not a “live beat”.
volatile boolean QS = false; // becomes true when Arduoino finds a beat.
// Regards Serial OutPut – Set This Up to your needs
static boolean serialVisual = true; // Set to ‘false’ by Default. Re-set to ‘true’ to see Arduino Serial Monitor ASCII Visual Pulse
void setup(){
pinMode(blinkPin,OUTPUT); // pin that will blink to your heartbeat!
pinMode(fadePin,OUTPUT); // pin that will fade to your heartbeat!
Serial.begin(115200); // we agree to talk fast!
interruptSetup(); // sets up to read Pulse Sensor signal every 2mS
// UN-COMMENT THE NEXT LINE IF YOU ARE POWERING The Pulse Sensor AT LOW VOLTAGE,
// AND APPLY THAT VOLTAGE TO THE A-REF PIN
// analogReference(EXTERNAL);
Genotronex.begin(9600);
Genotronex.println(“Bluetooth On please press 1 or 0 blink LED …”);
pinMode(ledpin,OUTPUT);
}
// Where the Magic Happens
void loop(){
serialOutput() ;
if (QS == true){ // A Heartbeat Was Found
// BPM and IBI have been Determined
// Quantified Self “QS” true when arduino finds a heartbeat
digitalWrite(blinkPin,HIGH); // Blink LED, we got a beat.
fadeRate = 255; // Makes the LED Fade Effect Happen
// Set ‘fadeRate’ Variable to 255 to fade LED with pulse
serialOutputWhenBeatHappens(); // A Beat Happened, Output that to serial.
QS = false; // reset the Quantified Self flag for next time
}
else {
digitalWrite(blinkPin,LOW); // There is not beat, turn off pin 13 LED
}
ledFadeToBeat(); // Makes the LED Fade Effect Happen
if (Genotronex.available()){
BluetoothData=Genotronex.read();
if(BluetoothData==‘1’){ // if number 1 pressed …
digitalWrite(ledpin,1);
Genotronex.println("LED On D12 ON ! ");
}
if (BluetoothData==‘0’){// if number 0 pressed …
digitalWrite(ledpin,0);
Genotronex.println("LED On D12 Off ! ");
}
}
delay(20); // take a break
}
ERROR MESSAGE:
Arduino: 1.8.4 (Windows 10), Board: “Arduino/Genuino Uno”
C:\Users\Wicke\AppData\Local\Temp\Temp1_FRAW610IC5CA2WA (2).zip\PulseSensor_wt_BT\PulseSensor_wt_BT.ino: In function ‘void loop()’:
PulseSensor_wt_BT:56: error: ‘serialOutput’ was not declared in this scope
serialOutput() ;
^
PulseSensor_wt_BT:64: error: ‘serialOutputWhenBeatHappens’ was not declared in this scope
serialOutputWhenBeatHappens(); // A Beat Happened, Output that to serial.
^
PulseSensor_wt_BT:72: error: ‘ledFadeToBeat’ was not declared in this scope
ledFadeToBeat(); // Makes the LED Fade Effect Happen
^
exit status 1
‘serialOutput’ was not declared in this scope
This report would have more information with
“Show verbose output during compilation”
option enabled in File → Preferences.
Thanks y’all, appreciate it:)