Im working with an Elegoo MEGA 2560 Arduino trying to test PWM Signal via CurieTimerOne and Im getting an error saying Im missing something but I am unable to figure out how to get it. there is nothing that comes up when searching aux_regs in the Arduino Cloud library.
Here is the code I am working with.
//#include <aux_regs.h>
#include <CurieTimerOne.h>
int LimitSwitchPin = A1
int LED_PIN = 13
void Signal() {
if (analogRead(LimitSwitchPin)) {
CurieTimerOne.pwmStart(13, 25.0, 1000000)
}
else {
CurieTimerOne.pwmStop()
}
}
void setup() {
pinMode(LED_PIN, OUTPUT); // sets the digital pin 13 as output
CurieTimerOne.pwmStart(13, 25.0, 1000000)
}
void loop() {
//Signal()
}
Here is the full debug output:
/usr/local/bin/arduino-cli compile --fqbn arduino:avr:mega:cpu=atmega2560 --build-cache-path /tmp --output-dir /tmp/312549462/build --build-path /tmp/arduino-build-C2EC1C811CF52F480B57F0622636B3F7 --library /mnt/create-efs/webide/e2/3f/e23f7927769d37b1d7966c098ffc5a02:ant_inthecircuits/libraries_v2/CurieTimerOne /tmp/312549462/LimitSwitch_PWM_Test
In file included from /tmp/312549462/LimitSwitch_PWM_Test/LimitSwitch_PWM_Test.ino:2:0:
/mnt/create-efs/webide/e2/3f/e23f7927769d37b1d7966c098ffc5a02:ant_inthecircuits/libraries_v2/CurieTimerOne/src/CurieTimerOne.h:45:10: fatal error: aux_regs.h: No such file or directory
#include <aux_regs.h>
^~~~~~~~~~~~
compilation terminated.
Error during build: exit status 1
including auxregs is commented out because it led to a different error saying it doesnt know what aux_regs is.