nixith / Wearable-Arduino

0 stars 0 forks source link

Issue: Conflicting Devices #1

Closed nixith closed 2 years ago

nixith commented 2 years ago

Describe your Issues:

The project includes the following modules/sensors:

The pulse sensor module has a method .begin(), which starts the pulse sensor. If the flag #define USE_ARDUINO_INTERRUPTS true is left at default or false, the sensor returns the following error when compiling:

%Appdata%\Arduino\libraries\PulseSensor_Playground\src/PulseSensorPlayground.cpp:56: undefined reference to `PulseSensorPlayground::UsingInterrupts'
%Appdata%\Arduino\libraries\PulseSensor_Playground\src/PulseSensorPlayground.cpp:57: undefined reference to `PulseSensorPlaygroundSetupInterrupt()'
collect2.exe: error: ld returned 1 exit status
exit status 1

As such, the use of interrupts is required.

However, in doing so, the temperature reading is always 0.00. While I am unfamiliar with C++, I suspect the heartrate monitor takes over the cpu, or something similar. Im not used to such low level control.

Replicate:

  1. Delete line 3 to replicate the error
  2. Delete lines 3 and 28 to allow temperature sensor data

Potential Fix

I believe that pausing the heartrate monitor with the .pause() method may allow a fix. Implementation is on the pause fix branch. However, I am unable to test the implementation at this time.

nixith commented 2 years ago

Issue was fixed, check merge of paus-fix branch