pkourany / PulseSensor_Spark

Pulse Sensor library v1.4 ported for Particle Core and Photon
Other
3 stars 18 forks source link

SparkIntervalTimer/SparkIntervalTimer.h: No such file or directory #4

Closed davesamgv94 closed 6 years ago

davesamgv94 commented 7 years ago

Veryfing code using this library in Particle Build fails with this error:

PulseSensor_Spark/PulseSensor_Spark.h:5:51: fatal error: SparkIntervalTimer/SparkIntervalTimer.h: No such file or directory
 #include "SparkIntervalTimer/SparkIntervalTimer.h"
                                                   ^
pkourany commented 7 years ago

@davesamgv94, did you remove the old library before re-adding the new one? And did you then add the SparkIntervalTimer to your app? I just tested with the demo code and it all compiled just fine.

davesamgv94 commented 7 years ago

Thank you but now I dont know what happened SparkIntervalTimer/SparkIntervalTimer.cpp: In member function 'void IntervalTimer::interrupt_SIT(action)': SparkIntervalTimer/SparkIntervalTimer.cpp:360:15: warning: variable 'TIMx' set but not used [-Wunused-but-set-variable] TIM_TypeDef* TIMx; ^ SparkIntervalTimer/SparkIntervalTimer.cpp: In member function 'void IntervalTimer::start_SIT(intPeriod, bool)': SparkIntervalTimer/SparkIntervalTimer.cpp:276:23: warning: 'TIMx' may be used uninitialized in this function [-Wmaybe-uninitialized] TIM_Cmd(TIMx, ENABLE); ^ SparkIntervalTimer/SparkIntervalTimer.cpp: In member function 'void IntervalTimer::stop_SIT()': SparkIntervalTimer/SparkIntervalTimer.cpp:346:18: warning: 'TIMx' may be used uninitialized in this function [-Wmaybe-uninitialized] TIM_DeInit(TIMx); ^ SparkIntervalTimer/SparkIntervalTimer.cpp: In member function 'void IntervalTimer::resetPeriod_SIT(intPeriod, bool)': SparkIntervalTimer/SparkIntervalTimer.cpp:476:23: warning: 'TIMx' may be used uninitialized in this function [-Wmaybe-uninitialized] TIMx->PSC = prescaler; ^ ../../../build/target/user/platform-6/libuser.a(corazon.o): In functionsetup': corazon.cpp:73: undefined reference to interruptSetup()' collect2: error: ld returned 1 exit status make: *** [3fcaac5e9a5874c8a9d949d30598cd07d2c048f3b1ae8fd76c036e7886f1.elf] Error 1

davesamgv94 commented 7 years ago

I update the library and I used de example but this happened, and thank you for your time

../../../build/target/user/platform-6/libuser.a(pulsesensoramped_arduino_1dot4.o): In functionsetup': pulsesensoramped_arduino_1dot4.cpp:67: undefined reference to blinkPin' pulsesensoramped_arduino_1dot4.cpp:67: undefined reference tofadePin' pulsesensoramped_arduino_1dot4.cpp:67: undefined reference to interruptSetup()' ../../../build/target/user/platform-6/libuser.a(pulsesensoramped_arduino_1dot4.o): In functionserialOutputWhenBeatHappens()': pulsesensoramped_arduino_1dot4.cpp:119: undefined reference to BPM' pulsesensoramped_arduino_1dot4.cpp:119: undefined reference toIBI' ../../../build/target/user/platform-6/libuser.a(pulsesensoramped_arduino_1dot4.o): In function ledFadeToBeat()': pulsesensoramped_arduino_1dot4.cpp:136: undefined reference tofadeRate' pulsesensoramped_arduino_1dot4.cpp:136: undefined reference to fadePin' ../../../build/target/user/platform-6/libuser.a(pulsesensoramped_arduino_1dot4.o): In functionserialOutput()': pulsesensoramped_arduino_1dot4.cpp:105: undefined reference to Signal' ../../../build/target/user/platform-6/libuser.a(pulsesensoramped_arduino_1dot4.o): In functionloop': pulsesensoramped_arduino_1dot4.cpp:92: undefined reference to QS' pulsesensoramped_arduino_1dot4.cpp:92: undefined reference toblinkPin' pulsesensoramped_arduino_1dot4.cpp:92: undefined reference to `fadeRate' collect2: error: ld returned 1 exit status make: *\ [c5249d4700569ef41fda2ae0db60fe6a2582d1c58961f40c1da96cd9a7ac.elf] Error 1

Error: Could not compile. Please review your code.`