I am an extreme beginner with Arduino, so please excuse my ignorance! I hope one (or several) of you can help me!
I have bought 3 pulsesensors for a project. I can each one to work individually using the code shared on http://pulsesensor.myshopify.com/pages/code-and-guide.
I am trying to connect all three into one arduino to blink 3 lights respectively - sensor 1 to led 1, sensor 2 to led 2, and sensor 3 to led 3. So that it can be connected to 3 different people. I have tried altering the code by triplicating every variable… but it does not seem to work. I do not need the processing function that comes with the code, nor the fading LED option. Just blink.
I have searched online and have not found anything that works, except for Justin Eastman who posted this video using two -
He has said two things -
“I just used a different analog pin that what the pulsesensor (dot) com example code. Then I just duplicated all the variables that were specific to a particular sensor. ?”
“I have achieved this by simply creating a FOR loop with an index in the interrupt code and then creating an array for all the variables with the number of sensors.”
Unfortunately I do not understand how to do the second. I tried the first but think (attached - the two files need to be in a folder named PulseSensorAmped_Arduino_1dot2_test) I have messed up somewhere along the way as I keep getting these errors -
Interrupt.ino: In function ‘void __vector_7()’:
Interrupt:255: error: expected
}' at end of input Interrupt:255: error: expected }’ at end of input
Could someone please help me?! I am an art student, and need to present this project very soon! Any help will be sooooo welcome!
Interrupt.ino (15.2 KB)