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

Error while trying to run default code from nodemcu Esp8266 #32

Open
dotjavafile opened this issue Dec 1, 2016 · 4 comments
Open

Error while trying to run default code from nodemcu Esp8266 #32

dotjavafile opened this issue Dec 1, 2016 · 4 comments

Comments

@dotjavafile
Copy link

Hello I am trying to run the default code provided in the tutorial in nodemcu v1 esp-12e.

github.com/WorldFamousElectronics/PulseSensor_Amped_Arduino

It runs in my arduino uno fine but when I try it with the nodemcu I get following error. Please help.

Read more: http://pulsesensor.proboards.com/thread/474/error-trying-default-code-nodemcu#ixzz4Rbo00iGf

`Interrupt:27: error: expected constructor, destructor, or type conversion before '(' token

ISR(TIMER2_COMPA_vect){ // triggered when Timer2 counts to 124

^

C:\Users\Zero\Documents\Arduino\PulseSensorAmped_Arduino_1dot4\Interrupt.ino: In function 'void interruptSetup()':

Interrupt:17: error: 'TCCR2A' was not declared in this scope

TCCR2A = 0x02; // DISABLE PWM ON DIGITAL PINS 3 AND 11, AND GO INTO CTC MODE

^

Interrupt:18: error: 'TCCR2B' was not declared in this scope

TCCR2B = 0x06; // DON'T FORCE COMPARE, 256 PRESCALER

^

Interrupt:19: error: 'OCR2A' was not declared in this scope

OCR2A = 0X7C; // SET THE TOP OF THE COUNT TO 124 FOR 500Hz SAMPLE RATE

^

Interrupt:20: error: 'TIMSK2' was not declared in this scope

TIMSK2 = 0x02; // ENABLE INTERRUPT ON MATCH BETWEEN TIMER2 AND OCR2A

^

C:\Users\Zero\Documents\Arduino\PulseSensorAmped_Arduino_1dot4\Interrupt.ino: At global scope:

Interrupt:27: error: expected constructor, destructor, or type conversion before '(' token

ISR(TIMER2_COMPA_vect){ // triggered when Timer2 counts to 124

^

exit status 1
expected constructor, destructor, or type conversion before '(' token

Read more: http://pulsesensor.proboards.com/thread/474/error-trying-default-code-nodemcu#ixzz4Rbo3ndv4`

@dotjavafile
Copy link
Author

Please any help?

@LeonFedotov
Copy link

Im also having this problem

@hagelric
Copy link

hagelric commented Feb 4, 2018

Please any help?

Same error here!

@biomurph
Copy link
Contributor

biomurph commented Feb 5, 2018

This is an older repo. We are directing everyone to use our new PulseSensor Playground library
https://github.com/WorldFamousElectronics/PulseSensorPlayground

Please follow this tutorial
https://pulsesensor.com/pages/getting-advanced
Not all hardwares will work with our code that uses interrupts. Please read the entire tutorial and try the example code PulseSensor_BPM_Alternative.ino

Also, note that the ESP8266 ADC can only accept up to 1V max. I'm not sure how the nodemcu works this, but be aware of that.

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

4 participants