Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using pulse sensor with ATtiny85 chip #41

Open
diontan524 opened this issue Feb 19, 2017 · 13 comments
Open

using pulse sensor with ATtiny85 chip #41

diontan524 opened this issue Feb 19, 2017 · 13 comments

Comments

@diontan524
Copy link

diontan524 commented Feb 19, 2017

Hi there, I am planning to use the Pulse sensor on attiny85 chip. But looks like the code uploaded online have to be modified due to the fact that attiny85 does not have timer2 and serial communication. With added serialsoftware, I am able to serialprint words to the serial monitor with the Attiny85 chip, so im quite sure my code there has no problem. But for the timer2 to be modified as timer1, I am not sure the codes that I found online is correct or not. I tried to serial print the BPM but not luck. Can anyone help Please ?

@diontan524
Copy link
Author

timer1 pulse rate.txt

@joelSensor
Copy link
Member

Hi diontan524,

That looks great! I will give your code mod a test run on the ATtiny85 that I have, and add notes to our master branch (and credit you) when I get it working. Do you have your version posted on a repo somewhere?

@diontan524
Copy link
Author

diontan524 commented Feb 22, 2017 via email

@diontan524
Copy link
Author

anyone has any solution yet ?

@biomurph
Copy link
Contributor

biomurph commented Mar 1, 2017

Hi,

I have an ATtiny, but it is on a Digitspark, and in order to use it on my mac I need an external USB hub thing. Please give me some time to get it all together.

In the meantime, you can use the example that is at the bottom of the Timer Interrupt Notes tab. That shows how to set up a software timer to sample the pulse sensor data.

@diontan524
Copy link
Author

I think it can use arduino to program it. That's the way I do it, by setting the arduino as ISP

@biomurph
Copy link
Contributor

biomurph commented Mar 1, 2017

Yes, I think that would work. My only ATtiny is attached to this digispark USB board. It already has the bootloader on it, etc.

@diontan524
Copy link
Author

diontan524 commented Mar 1, 2017 via email

@biomurph
Copy link
Contributor

biomurph commented Mar 1, 2017

Is it possible for you to use the software timer?
I do know of someone who is using it. Have not been in touch with them in a while...

@diontan524
Copy link
Author

diontan524 commented Mar 1, 2017 via email

@biomurph
Copy link
Contributor

biomurph commented Mar 1, 2017

Please check the Timer Interrupt Notes tab in this repo. At the end, it describes how to modify the code to use a software timer. It is not a library.

@joelSensor
Copy link
Member

I have updated the Timer Interrupt Notes page here
https://github.com/WorldFamousElectronics/PulseSensor_Amped_Arduino/tree/master/PulseSensorAmped_Arduino_1.5.0
There are Interrupt setup notes for ATtiny 85 running at 8MHz and also at 16MHz. They reference the Adafruit GEMMA and TRINKET. They are tested and they work.

What speed master clock are you using?

I have an original Digispark, Kickstarter Edition board. It runs at 16.5MHz, which makes the timer interrupt kind of messy.

@diontan524
Copy link
Author

diontan524 commented Mar 3, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants