Coder Social home page Coder Social logo

khoih-prog / rp2040_isr_servo Goto Github PK

View Code? Open in Web Editor NEW
17.0 3.0 4.0 83 KB

This library enables you to use 1 Hardware Timer on RP2040-based board, such as Nano_RP2040_Connect, RASPBERRY_PI_PICO, to control up to 16 or more servo motors. Now permitting using servos with different pulse ranges simultaneously.

License: MIT License

C++ 32.90% C 66.33% Shell 0.77%
rp2040 mbed-rp2040 mbed device control timing isr non-blocking hardware-timer isr-based-servo

rp2040_isr_servo's Introduction

RP2040_ISR_Servo Library

arduino-library-badge GitHub release GitHub contributions welcome GitHub issues

Donate to my libraries using BuyMeACoffee



Table of Contents



Important Change from v1.1.0

Please have a look at HOWTO Fix Multiple Definitions Linker Error



Why do we need this RP2040_ISR_Servo library

Features

Imagine you have a system with a mission-critical function controlling a robot arm or doing something much more important. You normally use a software timer to poll, or even place the function in loop(). But what if another function is blocking the loop() or setup().

So your function might not be executed, and the result would be disastrous.

You'd prefer to have your function called, no matter what happening with other functions (busy loop, bug, etc.).

The correct choice is to use a Hardware Timer with Interrupt to call your function.

These hardware timers, using interrupt, still work even if other functions are blocking. Moreover, they are much more precise (certainly depending on clock frequency accuracy) than other software timers using millis() or micros(). That's necessary if you need to measure some data requiring better accuracy.

Functions using normal software timers, relying on loop() and calling millis(), won't work if the loop() or setup() is blocked by certain operation. For example, certain function is blocking while it's connecting to WiFi or some services.

This library enables you to use 1 Hardware Timer on an RP2040-based board to control up to 16 independent servo motors.

Important Notes about using ISR

  1. Inside the attached function, delay() won’t work and the value returned by millis() will not increment. Serial data received while in the function may be lost. You should declare as volatile any variables that you modify within the attached function.

  2. Typically global variables are used to pass data between an ISR and the main program. To make sure variables shared between an ISR and the main program are updated correctly, declare them as volatile.

  3. Avoid using Serial.print()-related functions inside ISR. Just for temporary debug purpose, but even this also can crash the system any time. Beware.

  4. Your functions are now part of ISR (Interrupt Service Routine), and must be lean / mean, and follow certain rules. More to read on:

HOWTO Attach Interrupt

Currently supported Boards

  1. RP2040-based boards such as Nano_RP2040_Connect, RASPBERRY_PI_PICO, ADAFRUIT_FEATHER_RP2040 and GENERIC_RP2040, etc. using Arduino-mbed RP2040 core
  2. RP2040-based boards such as Nano_RP2040_Connect, RASPBERRY_PI_PICO, ADAFRUIT_FEATHER_RP2040 and GENERIC_RP2040, etc. using Earle Philhower's arduino-pico core


Prerequisites

  1. Arduino IDE 1.8.19+ for Arduino. GitHub release
  2. Arduino mbed_rp2040 core 3.4.1+ for Arduino (Use Arduino Board Manager) RP2040-based boards, such as Arduino Nano RP2040 Connect, RASPBERRY_PI_PICO, etc.. GitHub release
  3. Earle Philhower's arduino-pico core v2.6.3+ for RP2040-based boards such as RASPBERRY_PI_PICO, ADAFRUIT_FEATHER_RP2040 and GENERIC_RP2040, etc. GitHub release

Installation

Use Arduino Library Manager

The best and easiest way is to use Arduino Library Manager. Search for RP2040_ISR_Servo, then select / install the latest version. You can also use this link arduino-library-badge for more detailed instructions.

Manual Install

Another way to install is to:

  1. Navigate to RP2040_ISR_Servo page.
  2. Download the latest release RP2040_ISR_Servo-main.zip.
  3. Extract the zip file to RP2040_ISR_Servo-main directory
  4. Copy whole RP2040_ISR_Servo-main folder to Arduino libraries' directory such as ~/Arduino/libraries/.

VS Code & PlatformIO

  1. Install VS Code
  2. Install PlatformIO
  3. Install RP2040_ISR_Servo library by using Library Manager. Search for RP2040_ISR_Servo in Platform.io Author's Libraries
  4. Please visit documentation for the other options and examples at Project Configuration File


HOWTO Fix Multiple Definitions Linker Error

The current library implementation, using xyz-Impl.h instead of standard xyz.cpp, possibly creates certain Multiple Definitions Linker error in certain use cases.

You can include this .hpp file

// Can be included as many times as necessary, without `Multiple Definitions` Linker Error
#include "RP2040_ISR_Servo.hpp"     //https://github.com/khoih-prog/RP2040_ISR_Servo

in many files. But be sure to use the following .h file in just 1 .h, .cpp or .ino file, which must not be included in any other file, to avoid Multiple Definitions Linker Error

// To be included only in main(), .ino with setup() to avoid `Multiple Definitions` Linker Error
#include "RP2040_ISR_Servo.h"           //https://github.com/khoih-prog/RP2040_ISR_Servo

Check the new multiFileProject example for a HOWTO demo.

Have a look at the discussion in Different behaviour using the src_cpp or src_h lib #80



What special in this RP2040_ISR_Servo library

Now these new 16 ISR-based Servo controllers just use one RP2040 Hardware Timer. The number 16 is just arbitrarily chosen, and depending on application, you can increase that number to 32, 48, etc. without problem.

The accuracy is nearly perfect compared to software timers. The most important feature is they're ISR-based timers

Therefore, their executions are not blocked by bad-behaving functions / tasks. This important feature is absolutely necessary for mission-critical tasks.

The RP2040_MultipleServos example, which controls 6 servos independently, will demonstrate the nearly perfect accuracy.

Being ISR-based servo controllers, their executions are not blocked by bad-behaving functions / tasks, such as connecting to WiFi, Internet and Blynk services.

This non-being-blocked important feature is absolutely necessary for mission-critical tasks.



HOWTO Usage

How to use:

#if ( defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_RASPBERRY_PI_PICO) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) || \
      defined(ARDUINO_GENERIC_RP2040) ) && !defined(ARDUINO_ARCH_MBED)
  #if !defined(RP2040_ISR_SERVO_USING_MBED)    
    #define RP2040_ISR_SERVO_USING_MBED     false
  #endif  
  
#elif ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_RASPBERRY_PI_PICO) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) || \
      defined(ARDUINO_GENERIC_RP2040) ) && defined(ARDUINO_ARCH_MBED)
      
  #if !defined(RP2040_ISR_SERVO_USING_MBED)    
    #define RP2040_ISR_SERVO_USING_MBED     true
  #endif  
  
#else      
  #error This code is intended to run on the mbed / non-mbed RP2040 platform! Please check your Tools->Board setting.
#endif

#define TIMER_INTERRUPT_DEBUG       4
#define ISR_SERVO_DEBUG             4

#include "RP2040_ISR_Servo.h"

// Published values for SG90 servos; adjust if needed
#define MIN_MICROS        800
#define MAX_MICROS        2450 

#define SERVO_PIN_1       16
#define SERVO_PIN_2       17
#define SERVO_PIN_3       18
#define SERVO_PIN_4       19
#define SERVO_PIN_5       20
#define SERVO_PIN_6       21

typedef struct
{
  int     servoIndex;
  uint8_t servoPin;
} ISR_servo_t;

#define NUM_SERVOS            6

ISR_servo_t ISR_servo[NUM_SERVOS] =
{
  { -1, SERVO_PIN_1 }, { -1, SERVO_PIN_2 }, { -1, SERVO_PIN_3 }, { -1, SERVO_PIN_4 }, { -1, SERVO_PIN_5 }, { -1, SERVO_PIN_6 }
};

void setup()
{
  for (int index = 0; index < NUM_SERVOS; index++)
  {
    pinMode(ISR_servo[index].servoPin, OUTPUT);
    digitalWrite(ISR_servo[index].servoPin, LOW);
  }
  
  Serial.begin(115200);
  while (!Serial);

  delay(200);

#if defined(ARDUINO_ARCH_MBED)
  Serial.print(F("\nStarting RP2040_MultipleRandomServos on Mbed "));
#else
  Serial.print(F("\nStarting RP2040_MultipleRandomServos on "));
#endif

  Serial.println(BOARD_NAME);
  Serial.println(RP2040_ISR_SERVO_VERSION);

  for (int index = 0; index < NUM_SERVOS; index++)
  {
    ISR_servo[index].servoIndex = RP2040_ISR_Servos.setupServo(ISR_servo[index].servoPin, MIN_MICROS, MAX_MICROS);

    if (ISR_servo[index].servoIndex != -1)
    {
      Serial.print(F("Setup OK Servo index = ")); Serial.println(ISR_servo[index].servoIndex);

      RP2040_ISR_Servos.setPosition(ISR_servo[index].servoIndex, 0);
    }
    else
    {
      Serial.print(F("Setup Failed Servo index = ")); Serial.println(ISR_servo[index].servoIndex);
    }
  }
}

void printServoInfo(int indexServo)
{
  Serial.print(F("Servos idx = "));
  Serial.print(indexServo);
  Serial.print(F(", act. pos. (deg) = "));
  Serial.print(RP2040_ISR_Servos.getPosition(ISR_servo[indexServo].servoIndex) );
  Serial.print(F(", pulseWidth (us) = "));
  Serial.println(RP2040_ISR_Servos.getPulseWidth(ISR_servo[indexServo].servoIndex));
}

void loop()
{
  int position;      // position in degrees

  position = 0;
  Serial.println(F("Servos @ 0 degree"));
  
  for (int index = 0; index < NUM_SERVOS; index++)
  {
    RP2040_ISR_Servos.setPosition(ISR_servo[index].servoIndex, position );
    printServoInfo(index);
  }
  // waits 5s between test
  delay(5000);

  position = 90;
  Serial.println(F("Servos @ 90 degree"));
  
  for (int index = 0; index < NUM_SERVOS; index++)
  {
    RP2040_ISR_Servos.setPosition(ISR_servo[index].servoIndex, position );
    printServoInfo(index);
  }
  
  // waits 5s between test
  delay(5000);

  position = 180;
  Serial.println(F("Servos @ 180 degree"));
  
  for (int index = 0; index < NUM_SERVOS; index++)
  {
    RP2040_ISR_Servos.setPosition(ISR_servo[index].servoIndex, position );
    printServoInfo(index);
  }
  
  // waits 5s between test
  delay(5000);

  Serial.println(F("Servos sweeps from 0-180 degrees"));
  
  for (position = 0; position <= 180; position += 5)
  {
    // goes from 0 degrees to 180 degrees
    // in steps of 1 degree
    for (int index = 0; index < NUM_SERVOS; index++)
    {
      RP2040_ISR_Servos.setPosition(ISR_servo[index].servoIndex, position );
    }
    
    // waits 0.1s for the servo to reach the position
    delay(100);
  }
  
  // waits 5s between test
  delay(5000);
}


Examples:

  1. RP2040_MultipleRandomServos
  2. RP2040_MultipleServos
  3. multiFileProject New

#if ( defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_RASPBERRY_PI_PICO) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) || \
defined(ARDUINO_GENERIC_RP2040) ) && !defined(ARDUINO_ARCH_MBED)
#if !defined(RP2040_ISR_SERVO_USING_MBED)
#define RP2040_ISR_SERVO_USING_MBED false
#endif
#elif ( defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_RASPBERRY_PI_PICO) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) || \
defined(ARDUINO_GENERIC_RP2040) ) && defined(ARDUINO_ARCH_MBED)
#if !defined(RP2040_ISR_SERVO_USING_MBED)
#define RP2040_ISR_SERVO_USING_MBED true
#endif
#else
#error This code is intended to run on the mbed / non-mbed RP2040 platform! Please check your Tools->Board setting.
#endif
#define ISR_SERVO_DEBUG 4
// Can be included as many times as necessary, without `Multiple Definitions` Linker Error
#include "RP2040_ISR_Servo.h"
// Published values for SG90 servos; adjust if needed
#define MIN_MICROS 800
#define MAX_MICROS 2450
#define SERVO_PIN_1 16
#define SERVO_PIN_2 17
#define SERVO_PIN_3 18
#define SERVO_PIN_4 19
#define SERVO_PIN_5 20
#define SERVO_PIN_6 21
typedef struct
{
int servoIndex;
uint8_t servoPin;
} ISR_servo_t;
#define NUM_SERVOS 6
ISR_servo_t ISR_servo[NUM_SERVOS] =
{
{ -1, SERVO_PIN_1 }, { -1, SERVO_PIN_2 }, { -1, SERVO_PIN_3 }, { -1, SERVO_PIN_4 }, { -1, SERVO_PIN_5 }, { -1, SERVO_PIN_6 }
};
void setup()
{
for (int index = 0; index < NUM_SERVOS; index++)
{
pinMode(ISR_servo[index].servoPin, OUTPUT);
digitalWrite(ISR_servo[index].servoPin, LOW);
}
Serial.begin(115200);
while (!Serial);
delay(200);
#if defined(ARDUINO_ARCH_MBED)
Serial.print(F("\nStarting RP2040_MultipleServos on Mbed "));
#else
Serial.print(F("\nStarting RP2040_MultipleServos on "));
#endif
Serial.println(BOARD_NAME);
Serial.println(RP2040_ISR_SERVO_VERSION);
for (int index = 0; index < NUM_SERVOS; index++)
{
ISR_servo[index].servoIndex = RP2040_ISR_Servos.setupServo(ISR_servo[index].servoPin, MIN_MICROS, MAX_MICROS);
if (ISR_servo[index].servoIndex != -1)
{
Serial.print(F("Setup OK Servo index = ")); Serial.println(ISR_servo[index].servoIndex);
RP2040_ISR_Servos.setPosition(ISR_servo[index].servoIndex, 0);
}
else
{
Serial.print(F("Setup Failed Servo index = ")); Serial.println(ISR_servo[index].servoIndex);
}
}
}
void loop()
{
int position; // position in degrees
for (position = 0; position <= 180; position += 10)
{
// goes from 0 degrees to 180 degrees
// in steps of 10 degree
for (int index = 0; index < NUM_SERVOS; index++)
{
RP2040_ISR_Servos.setPosition(ISR_servo[index].servoIndex, position);
}
// waits 1s for the servo to reach the position
delay(1000);
}
delay(5000);
}



Debug Terminal Output Samples

1. RP2040_MultipleRandomServos on Mbed RaspberryPi Pico

Starting RP2040_MultipleRandomServos on Mbed RaspberryPi Pico
Mbed RP2040_ISR_Servo v1.1.2
Setup OK Servo index = 0
Setup OK Servo index = 1
Setup OK Servo index = 2
Setup OK Servo index = 3
Setup OK Servo index = 4
Setup OK Servo index = 5
Servos @ 0 degree
Servos idx = 0, act. pos. (deg) = 800, pulseWidth (us) = 800
Servos idx = 1, act. pos. (deg) = 800, pulseWidth (us) = 800
Servos idx = 2, act. pos. (deg) = 800, pulseWidth (us) = 800
Servos idx = 3, act. pos. (deg) = 800, pulseWidth (us) = 800
Servos idx = 4, act. pos. (deg) = 800, pulseWidth (us) = 800
Servos idx = 5, act. pos. (deg) = 800, pulseWidth (us) = 800
Servos @ 90 degree
Servos idx = 0, act. pos. (deg) = 1625, pulseWidth (us) = 1625
Servos idx = 1, act. pos. (deg) = 1625, pulseWidth (us) = 1625
Servos idx = 2, act. pos. (deg) = 1625, pulseWidth (us) = 1625
Servos idx = 3, act. pos. (deg) = 1625, pulseWidth (us) = 1625
Servos idx = 4, act. pos. (deg) = 1625, pulseWidth (us) = 1625
Servos idx = 5, act. pos. (deg) = 1625, pulseWidth (us) = 1625
Servos @ 180 degree
Servos idx = 0, act. pos. (deg) = 2450, pulseWidth (us) = 2450
Servos idx = 1, act. pos. (deg) = 2450, pulseWidth (us) = 2450
Servos idx = 2, act. pos. (deg) = 2450, pulseWidth (us) = 2450
Servos idx = 3, act. pos. (deg) = 2450, pulseWidth (us) = 2450
Servos idx = 4, act. pos. (deg) = 2450, pulseWidth (us) = 2450
Servos idx = 5, act. pos. (deg) = 2450, pulseWidth (us) = 2450
Servos sweeps from 0-180 degrees
Servos @ 0 degree
Servos idx = 0, act. pos. (deg) = 800, pulseWidth (us) = 800
Servos idx = 1, act. pos. (deg) = 800, pulseWidth (us) = 800
Servos idx = 2, act. pos. (deg) = 800, pulseWidth (us) = 800
Servos idx = 3, act. pos. (deg) = 800, pulseWidth (us) = 800
Servos idx = 4, act. pos. (deg) = 800, pulseWidth (us) = 800
Servos idx = 5, act. pos. (deg) = 800, pulseWidth (us) = 800

2. RP2040_MultipleRandomServos on RaspberryPi Pico

Starting RP2040_MultipleRandomServos on RaspberryPi Pico
RP2040_ISR_Servo v1.1.2
Setup OK Servo index = 0
Setup OK Servo index = 1
Setup OK Servo index = 2
Setup OK Servo index = 3
Setup OK Servo index = 4
Setup OK Servo index = 5
Servos @ 0 degree
Servos idx = 0, act. pos. (deg) = 800, pulseWidth (us) = 800
Servos idx = 1, act. pos. (deg) = 800, pulseWidth (us) = 800
Servos idx = 2, act. pos. (deg) = 800, pulseWidth (us) = 800
Servos idx = 3, act. pos. (deg) = 800, pulseWidth (us) = 800
Servos idx = 4, act. pos. (deg) = 800, pulseWidth (us) = 800
Servos idx = 5, act. pos. (deg) = 800, pulseWidth (us) = 800
Servos @ 90 degree
Servos idx = 0, act. pos. (deg) = 1625, pulseWidth (us) = 1625
Servos idx = 1, act. pos. (deg) = 1625, pulseWidth (us) = 1625
Servos idx = 2, act. pos. (deg) = 1625, pulseWidth (us) = 1625
Servos idx = 3, act. pos. (deg) = 1625, pulseWidth (us) = 1625
Servos idx = 4, act. pos. (deg) = 1625, pulseWidth (us) = 1625
Servos idx = 5, act. pos. (deg) = 1625, pulseWidth (us) = 1625
Servos @ 180 degree
Servos idx = 0, act. pos. (deg) = 2450, pulseWidth (us) = 2450
Servos idx = 1, act. pos. (deg) = 2450, pulseWidth (us) = 2450
Servos idx = 2, act. pos. (deg) = 2450, pulseWidth (us) = 2450
Servos idx = 3, act. pos. (deg) = 2450, pulseWidth (us) = 2450
Servos idx = 4, act. pos. (deg) = 2450, pulseWidth (us) = 2450
Servos idx = 5, act. pos. (deg) = 2450, pulseWidth (us) = 2450
Servos sweeps from 0-180 degrees
Servos @ 0 degree
Servos idx = 0, act. pos. (deg) = 800, pulseWidth (us) = 800
Servos idx = 1, act. pos. (deg) = 800, pulseWidth (us) = 800
Servos idx = 2, act. pos. (deg) = 800, pulseWidth (us) = 800
Servos idx = 3, act. pos. (deg) = 800, pulseWidth (us) = 800
Servos idx = 4, act. pos. (deg) = 800, pulseWidth (us) = 800
Servos idx = 5, act. pos. (deg) = 800, pulseWidth (us) = 800

3. RP2040_MultipleServos on RaspberryPi Pico

Starting RP2040_MultipleServos on RASPBERRY_PI_PICO
RP2040_ISR_Servo v1.1.2
Setup OK Servo index = 0
Setup OK Servo index = 1
Setup OK Servo index = 2
Setup OK Servo index = 3
Setup OK Servo index = 4
Setup OK Servo index = 5


Debug

Debug is enabled by default on Serial.

You can also change the debugging level from 0 to 2. Be careful and using level 2 only for temporary debug purpose only.

#define TIMER_INTERRUPT_DEBUG       1
#define ISR_SERVO_DEBUG             1

Troubleshooting

If you get compilation errors, more often than not, you may need to install a newer version of the core for Arduino boards.

Sometimes, the library will only work if you update the board core to the latest version because I am using newly added functions.



Issues

Submit issues to: RP2040_ISR_Servo issues



TO DO

  1. Search for bug and improvement.

DONE

  1. Similar features for Arduino (UNO, Mega, etc...), ESP32, ESP8266 and STM32
  2. Add functions getPosition() and getPulseWidth()
  3. Optimize the code
  4. Add complicated examples
  5. Convert to h-only style
  6. Add example multiFileProject to demo for multiple-file project
  7. Optimize code by using passing by reference instead of by `value
  8. Permit using servos with different pulse ranges simultaneously
  9. Add astyle using allman style. Restyle the library


Contributions and thanks

Many thanks for everyone for bug reporting, new feature suggesting, testing and contributing to the development of this library. Especially to these people who have directly or indirectly contributed to this RP2040_ISR_Servo library

  1. Thanks to Radek Voltr for the PR setPulseWidth - removed wrong map #2, leading to new version v1.1.0
  2. Thanks to Samt43 for the PR Fix Bug #5 : Permit using servos with different pulse ranges simultaneously #4, leading to new version v1.1.2
RadekVoltr
Radek Voltr

Samt43
Samt43


Contributing

If you want to contribute to this project:

  • Report bugs and errors
  • Ask for enhancements
  • Create issues and pull requests
  • Tell other people about this library


License

  • The library is licensed under MIT

Copyright

Copyright (c) 2021- Khoi Hoang

rp2040_isr_servo's People

Contributors

khoih-prog avatar samt43 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

rp2040_isr_servo's Issues

Error compiling for Xiao rp2040

Here is the compiling of the example RP2040_MultipleServos.
I down loaded the zip file and tried to download into a Xiao Rp2040 and found that it gave an error for:
61 | #define RP2040_MAX_PIN NUM_DIGITAL_PINS

Below is the compile messages. I hope this helps.

llgrills

Arduino: 1.8.13 (Windows 10), TD: 1.53, Board: "Seeed XIAO RP2040, 2MB (no FS), 125 MHz, Small (-Os) (standard), Disabled, Disabled, None, Pico SDK"

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\Larry\AppData\Local\Arduino15\packages -hardware C:\Users\Larry\Documents\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\Larry\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Larry\Documents\Arduino\libraries -fqbn=Seeeduino:rp2040:Seeed_XIAO_RP2040:flash=2097152_0,freq=125,opt=Small,rtti=Disabled,dbgport=Disabled,dbglvl=None,usbstack=picosdk -vid-pid=2E8A_8042 -ide-version=10813 -build-path C:\Users\Larry\AppData\Local\Temp\arduino_build_468275 -warnings=none -build-cache C:\Users\Larry\AppData\Local\Temp\arduino_cache_73008 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.pqt-mklittlefs.path=C:\Users\Larry\AppData\Local\Arduino15\packages\Seeeduino\tools\pqt-mklittlefs\1.3.1-a-7855b0c -prefs=runtime.tools.pqt-mklittlefs-1.3.1-a-7855b0c.path=C:\Users\Larry\AppData\Local\Arduino15\packages\Seeeduino\tools\pqt-mklittlefs\1.3.1-a-7855b0c -prefs=runtime.tools.pqt-pioasm.path=C:\Users\Larry\AppData\Local\Arduino15\packages\Seeeduino\tools\pqt-pioasm\1.3.1-a-7855b0c -prefs=runtime.tools.pqt-pioasm-1.3.1-a-7855b0c.path=C:\Users\Larry\AppData\Local\Arduino15\packages\Seeeduino\tools\pqt-pioasm\1.3.1-a-7855b0c -prefs=runtime.tools.pqt-elf2uf2.path=C:\Users\Larry\AppData\Local\Arduino15\packages\Seeeduino\tools\pqt-elf2uf2\1.3.1-a-7855b0c -prefs=runtime.tools.pqt-elf2uf2-1.3.1-a-7855b0c.path=C:\Users\Larry\AppData\Local\Arduino15\packages\Seeeduino\tools\pqt-elf2uf2\1.3.1-a-7855b0c -prefs=runtime.tools.pqt-openocd.path=C:\Users\Larry\AppData\Local\Arduino15\packages\Seeeduino\tools\pqt-openocd\1.3.1-a-7855b0c -prefs=runtime.tools.pqt-openocd-1.3.1-a-7855b0c.path=C:\Users\Larry\AppData\Local\Arduino15\packages\Seeeduino\tools\pqt-openocd\1.3.1-a-7855b0c -prefs=runtime.tools.pqt-gcc.path=C:\Users\Larry\AppData\Local\Arduino15\packages\Seeeduino\tools\pqt-gcc\1.3.1-a-7855b0c -prefs=runtime.tools.pqt-gcc-1.3.1-a-7855b0c.path=C:\Users\Larry\AppData\Local\Arduino15\packages\Seeeduino\tools\pqt-gcc\1.3.1-a-7855b0c -prefs=runtime.tools.pqt-python3.path=C:\Users\Larry\AppData\Local\Arduino15\packages\Seeeduino\tools\pqt-python3\1.0.1-base-3a57aed -prefs=runtime.tools.pqt-python3-1.0.1-base-3a57aed.path=C:\Users\Larry\AppData\Local\Arduino15\packages\Seeeduino\tools\pqt-python3\1.0.1-base-3a57aed -verbose C:\Users\Larry\Documents\Arduino\libraries\RP2040_ISR_Servo-main\examples\RP2040_MultipleServos\RP2040_MultipleServos.ino

C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\Larry\AppData\Local\Arduino15\packages -hardware C:\Users\Larry\Documents\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\Larry\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Larry\Documents\Arduino\libraries -fqbn=Seeeduino:rp2040:Seeed_XIAO_RP2040:flash=2097152_0,freq=125,opt=Small,rtti=Disabled,dbgport=Disabled,dbglvl=None,usbstack=picosdk -vid-pid=2E8A_8042 -ide-version=10813 -build-path C:\Users\Larry\AppData\Local\Temp\arduino_build_468275 -warnings=none -build-cache C:\Users\Larry\AppData\Local\Temp\arduino_cache_73008 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.pqt-mklittlefs.path=C:\Users\Larry\AppData\Local\Arduino15\packages\Seeeduino\tools\pqt-mklittlefs\1.3.1-a-7855b0c -prefs=runtime.tools.pqt-mklittlefs-1.3.1-a-7855b0c.path=C:\Users\Larry\AppData\Local\Arduino15\packages\Seeeduino\tools\pqt-mklittlefs\1.3.1-a-7855b0c -prefs=runtime.tools.pqt-pioasm.path=C:\Users\Larry\AppData\Local\Arduino15\packages\Seeeduino\tools\pqt-pioasm\1.3.1-a-7855b0c -prefs=runtime.tools.pqt-pioasm-1.3.1-a-7855b0c.path=C:\Users\Larry\AppData\Local\Arduino15\packages\Seeeduino\tools\pqt-pioasm\1.3.1-a-7855b0c -prefs=runtime.tools.pqt-elf2uf2.path=C:\Users\Larry\AppData\Local\Arduino15\packages\Seeeduino\tools\pqt-elf2uf2\1.3.1-a-7855b0c -prefs=runtime.tools.pqt-elf2uf2-1.3.1-a-7855b0c.path=C:\Users\Larry\AppData\Local\Arduino15\packages\Seeeduino\tools\pqt-elf2uf2\1.3.1-a-7855b0c -prefs=runtime.tools.pqt-openocd.path=C:\Users\Larry\AppData\Local\Arduino15\packages\Seeeduino\tools\pqt-openocd\1.3.1-a-7855b0c -prefs=runtime.tools.pqt-openocd-1.3.1-a-7855b0c.path=C:\Users\Larry\AppData\Local\Arduino15\packages\Seeeduino\tools\pqt-openocd\1.3.1-a-7855b0c -prefs=runtime.tools.pqt-gcc.path=C:\Users\Larry\AppData\Local\Arduino15\packages\Seeeduino\tools\pqt-gcc\1.3.1-a-7855b0c -prefs=runtime.tools.pqt-gcc-1.3.1-a-7855b0c.path=C:\Users\Larry\AppData\Local\Arduino15\packages\Seeeduino\tools\pqt-gcc\1.3.1-a-7855b0c -prefs=runtime.tools.pqt-python3.path=C:\Users\Larry\AppData\Local\Arduino15\packages\Seeeduino\tools\pqt-python3\1.0.1-base-3a57aed -prefs=runtime.tools.pqt-python3-1.0.1-base-3a57aed.path=C:\Users\Larry\AppData\Local\Arduino15\packages\Seeeduino\tools\pqt-python3\1.0.1-base-3a57aed -verbose C:\Users\Larry\Documents\Arduino\libraries\RP2040_ISR_Servo-main\examples\RP2040_MultipleServos\RP2040_MultipleServos.ino

Using board 'Seeed_XIAO_RP2040' from platform in folder: C:\Users\Larry\AppData\Local\Arduino15\packages\Seeeduino\hardware\rp2040\1.12.0

Using core 'rp2040' from platform in folder: C:\Users\Larry\AppData\Local\Arduino15\packages\Seeeduino\hardware\rp2040\1.12.0

Detecting libraries used...

"C:\\Users\\Larry\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\tools\\pqt-gcc\\1.3.1-a-7855b0c/bin/arm-none-eabi-g++" -c -Werror=return-type "-IC:\\Users\\Larry\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\rp2040\\1.12.0/tools/libpico" -DCFG_TUSB_MCU=OPT_MCU_RP2040 -DUSB_VID=0x2886 -DUSB_PID=0x8042 "-DUSB_MANUFACTURER=\"Raspberry Pi\"" "-DUSB_PRODUCT=\"Pico\"" -march=armv6-m -mcpu=cortex-m0plus -mthumb -ffunction-sections -fdata-sections -fno-exceptions "-iprefixC:\\Users\\Larry\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\rp2040\\1.12.0/" "@C:\\Users\\Larry\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\rp2040\\1.12.0/lib/platform_inc.txt" -fno-rtti -std=gnu++17 -g -w -x c++ -E -CC -DSERIALUSB_PID=0x8042 -DUSBD_MAX_POWER_MA=250 -DF_CPU=125000000L -DARDUINO=10813 -DARDUINO_RASPBERRY_PI_PICO "-DBOARD_NAME=\"RASPBERRY_PI_PICO\"" -DARDUINO_ARCH_RP2040 -Os "-IC:\\Users\\Larry\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\rp2040\\1.12.0\\cores\\rp2040" "-IC:\\Users\\Larry\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\rp2040\\1.12.0\\variants\\Seeed_XIAO_RP2040" "C:\\Users\\Larry\\AppData\\Local\\Temp\\arduino_build_468275\\sketch\\RP2040_MultipleServos.ino.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE

Alternatives for RP2040_ISR_Servo.h: [[email protected]]

ResolveLibrary(RP2040_ISR_Servo.h)

  -> candidates: [[email protected]]

"C:\\Users\\Larry\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\tools\\pqt-gcc\\1.3.1-a-7855b0c/bin/arm-none-eabi-g++" -c -Werror=return-type "-IC:\\Users\\Larry\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\rp2040\\1.12.0/tools/libpico" -DCFG_TUSB_MCU=OPT_MCU_RP2040 -DUSB_VID=0x2886 -DUSB_PID=0x8042 "-DUSB_MANUFACTURER=\"Raspberry Pi\"" "-DUSB_PRODUCT=\"Pico\"" -march=armv6-m -mcpu=cortex-m0plus -mthumb -ffunction-sections -fdata-sections -fno-exceptions "-iprefixC:\\Users\\Larry\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\rp2040\\1.12.0/" "@C:\\Users\\Larry\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\rp2040\\1.12.0/lib/platform_inc.txt" -fno-rtti -std=gnu++17 -g -w -x c++ -E -CC -DSERIALUSB_PID=0x8042 -DUSBD_MAX_POWER_MA=250 -DF_CPU=125000000L -DARDUINO=10813 -DARDUINO_RASPBERRY_PI_PICO "-DBOARD_NAME=\"RASPBERRY_PI_PICO\"" -DARDUINO_ARCH_RP2040 -Os "-IC:\\Users\\Larry\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\rp2040\\1.12.0\\cores\\rp2040" "-IC:\\Users\\Larry\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\rp2040\\1.12.0\\variants\\Seeed_XIAO_RP2040" "-IC:\\Users\\Larry\\Documents\\Arduino\\libraries\\RP2040_ISR_Servo-main\\src" "C:\\Users\\Larry\\AppData\\Local\\Temp\\arduino_build_468275\\sketch\\RP2040_MultipleServos.ino.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE

Alternatives for servo.pio.h: [[email protected]]

ResolveLibrary(servo.pio.h)

  -> candidates: [[email protected]]

"C:\\Users\\Larry\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\tools\\pqt-gcc\\1.3.1-a-7855b0c/bin/arm-none-eabi-g++" -c -Werror=return-type "-IC:\\Users\\Larry\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\rp2040\\1.12.0/tools/libpico" -DCFG_TUSB_MCU=OPT_MCU_RP2040 -DUSB_VID=0x2886 -DUSB_PID=0x8042 "-DUSB_MANUFACTURER=\"Raspberry Pi\"" "-DUSB_PRODUCT=\"Pico\"" -march=armv6-m -mcpu=cortex-m0plus -mthumb -ffunction-sections -fdata-sections -fno-exceptions "-iprefixC:\\Users\\Larry\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\rp2040\\1.12.0/" "@C:\\Users\\Larry\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\rp2040\\1.12.0/lib/platform_inc.txt" -fno-rtti -std=gnu++17 -g -w -x c++ -E -CC -DSERIALUSB_PID=0x8042 -DUSBD_MAX_POWER_MA=250 -DF_CPU=125000000L -DARDUINO=10813 -DARDUINO_RASPBERRY_PI_PICO "-DBOARD_NAME=\"RASPBERRY_PI_PICO\"" -DARDUINO_ARCH_RP2040 -Os "-IC:\\Users\\Larry\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\rp2040\\1.12.0\\cores\\rp2040" "-IC:\\Users\\Larry\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\rp2040\\1.12.0\\variants\\Seeed_XIAO_RP2040" "-IC:\\Users\\Larry\\Documents\\Arduino\\libraries\\RP2040_ISR_Servo-main\\src" "-IC:\\Users\\Larry\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\rp2040\\1.12.0\\libraries\\Servo\\src" "C:\\Users\\Larry\\AppData\\Local\\Temp\\arduino_build_468275\\sketch\\RP2040_MultipleServos.ino.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE

"C:\\Users\\Larry\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\tools\\pqt-gcc\\1.3.1-a-7855b0c/bin/arm-none-eabi-g++" -c -Werror=return-type "-IC:\\Users\\Larry\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\rp2040\\1.12.0/tools/libpico" -DCFG_TUSB_MCU=OPT_MCU_RP2040 -DUSB_VID=0x2886 -DUSB_PID=0x8042 "-DUSB_MANUFACTURER=\"Raspberry Pi\"" "-DUSB_PRODUCT=\"Pico\"" -march=armv6-m -mcpu=cortex-m0plus -mthumb -ffunction-sections -fdata-sections -fno-exceptions "-iprefixC:\\Users\\Larry\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\rp2040\\1.12.0/" "@C:\\Users\\Larry\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\rp2040\\1.12.0/lib/platform_inc.txt" -fno-rtti -std=gnu++17 -g -w -x c++ -E -CC -DSERIALUSB_PID=0x8042 -DUSBD_MAX_POWER_MA=250 -DF_CPU=125000000L -DARDUINO=10813 -DARDUINO_RASPBERRY_PI_PICO "-DBOARD_NAME=\"RASPBERRY_PI_PICO\"" -DARDUINO_ARCH_RP2040 -Os "-IC:\\Users\\Larry\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\rp2040\\1.12.0\\cores\\rp2040" "-IC:\\Users\\Larry\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\rp2040\\1.12.0\\variants\\Seeed_XIAO_RP2040" "-IC:\\Users\\Larry\\Documents\\Arduino\\libraries\\RP2040_ISR_Servo-main\\src" "-IC:\\Users\\Larry\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\rp2040\\1.12.0\\libraries\\Servo\\src" "C:\\Users\\Larry\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\rp2040\\1.12.0\\libraries\\Servo\\src\\Servo.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE

Generating function prototypes...

"C:\\Users\\Larry\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\tools\\pqt-gcc\\1.3.1-a-7855b0c/bin/arm-none-eabi-g++" -c -Werror=return-type "-IC:\\Users\\Larry\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\rp2040\\1.12.0/tools/libpico" -DCFG_TUSB_MCU=OPT_MCU_RP2040 -DUSB_VID=0x2886 -DUSB_PID=0x8042 "-DUSB_MANUFACTURER=\"Raspberry Pi\"" "-DUSB_PRODUCT=\"Pico\"" -march=armv6-m -mcpu=cortex-m0plus -mthumb -ffunction-sections -fdata-sections -fno-exceptions "-iprefixC:\\Users\\Larry\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\rp2040\\1.12.0/" "@C:\\Users\\Larry\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\rp2040\\1.12.0/lib/platform_inc.txt" -fno-rtti -std=gnu++17 -g -w -x c++ -E -CC -DSERIALUSB_PID=0x8042 -DUSBD_MAX_POWER_MA=250 -DF_CPU=125000000L -DARDUINO=10813 -DARDUINO_RASPBERRY_PI_PICO "-DBOARD_NAME=\"RASPBERRY_PI_PICO\"" -DARDUINO_ARCH_RP2040 -Os "-IC:\\Users\\Larry\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\rp2040\\1.12.0\\cores\\rp2040" "-IC:\\Users\\Larry\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\rp2040\\1.12.0\\variants\\Seeed_XIAO_RP2040" "-IC:\\Users\\Larry\\Documents\\Arduino\\libraries\\RP2040_ISR_Servo-main\\src" "-IC:\\Users\\Larry\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\rp2040\\1.12.0\\libraries\\Servo\\src" "C:\\Users\\Larry\\AppData\\Local\\Temp\\arduino_build_468275\\sketch\\RP2040_MultipleServos.ino.cpp" -o "C:\\Users\\Larry\\AppData\\Local\\Temp\\arduino_build_468275\\preproc\\ctags_target_for_gcc_minus_e.cpp" -DARDUINO_LIB_DISCOVERY_PHASE

"C:\\Program Files (x86)\\Arduino\\tools-builder\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\Users\\Larry\\AppData\\Local\\Temp\\arduino_build_468275\\preproc\\ctags_target_for_gcc_minus_e.cpp"

Compiling sketch...

"C:\\Users\\Larry\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\tools\\pqt-gcc\\1.3.1-a-7855b0c/bin/arm-none-eabi-g++" -c -Werror=return-type "-IC:\\Users\\Larry\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\rp2040\\1.12.0/tools/libpico" -DCFG_TUSB_MCU=OPT_MCU_RP2040 -DUSB_VID=0x2886 -DUSB_PID=0x8042 "-DUSB_MANUFACTURER=\"Raspberry Pi\"" "-DUSB_PRODUCT=\"Pico\"" -march=armv6-m -mcpu=cortex-m0plus -mthumb -ffunction-sections -fdata-sections -fno-exceptions "-iprefixC:\\Users\\Larry\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\rp2040\\1.12.0/" "@C:\\Users\\Larry\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\rp2040\\1.12.0/lib/platform_inc.txt" -fno-rtti -std=gnu++17 -g -DSERIALUSB_PID=0x8042 -DUSBD_MAX_POWER_MA=250 -DF_CPU=125000000L -DARDUINO=10813 -DARDUINO_RASPBERRY_PI_PICO "-DBOARD_NAME=\"RASPBERRY_PI_PICO\"" -DARDUINO_ARCH_RP2040 -Os "-IC:\\Users\\Larry\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\rp2040\\1.12.0\\cores\\rp2040" "-IC:\\Users\\Larry\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\rp2040\\1.12.0\\variants\\Seeed_XIAO_RP2040" "-IC:\\Users\\Larry\\Documents\\Arduino\\libraries\\RP2040_ISR_Servo-main\\src" "-IC:\\Users\\Larry\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\rp2040\\1.12.0\\libraries\\Servo\\src" "C:\\Users\\Larry\\AppData\\Local\\Temp\\arduino_build_468275\\sketch\\RP2040_MultipleServos.ino.cpp" -o "C:\\Users\\Larry\\AppData\\Local\\Temp\\arduino_build_468275\\sketch\\RP2040_MultipleServos.ino.cpp.o"

In file included from C:\Users\Larry\Documents\Arduino\libraries\RP2040_ISR_Servo-main\src/RP2040_ISR_Servo.h:28,

                 from C:\Users\Larry\Documents\Arduino\libraries\RP2040_ISR_Servo-main\examples\RP2040_MultipleServos\RP2040_MultipleServos.ino:65:

C:\Users\Larry\Documents\Arduino\libraries\RP2040_ISR_Servo-main\src/RP2040_ISR_Servo_Impl.h: In member function 'int8_t RP2040_ISR_Servo::setupServo(const uint8_t&, const uint16_t&, const uint16_t&, uint16_t)':

**_**C:\Users\Larry\Documents\Arduino\libraries\RP2040_ISR_Servo-main\src/RP2040_ISR_Servo.hpp:61:34: error: 'NUM_DIGITAL_PINS' was not declared in this scope

   61 | #define RP2040_MAX_PIN           NUM_DIGITAL_PINS

      |                                  ^~~~~~~~~~~~~~~~

C:\Users\Larry\Documents\Arduino\libraries\RP2040_ISR_Servo-main\src/RP2040_ISR_Servo_Impl.h:85:13: note: in expansion of macro 'RP2040_MAX_PIN'

   85 |   if (pin > RP2040_MAX_PIN)

      |             ^~~~~~~~~~~~~~

C:\Users\Larry\Documents\Arduino\libraries\RP2040_ISR_Servo-main\src/RP2040_ISR_Servo_Impl.h: In member function 'bool RP2040_ISR_Servo::setPosition(const uint8_t&, uint16_t)':

C:\Users\Larry\Documents\Arduino\libraries\RP2040_ISR_Servo-main\src/RP2040_ISR_Servo.hpp:61:34: error: 'NUM_DIGITAL_PINS' was not declared in this scope

   61 | #define RP2040_MAX_PIN           NUM_DIGITAL_PINS

      |                                  ^~~~~~~~~~~~~~~~

C:\Users\Larry\Documents\Arduino\libraries\RP2040_ISR_Servo-main\src/RP2040_ISR_Servo_Impl.h:199:63: note: in expansion of macro 'RP2040_MAX_PIN'

  199 |   if ( servo[servoIndex].enabled && (servo[servoIndex].pin <= RP2040_MAX_PIN) )

      |                                                               ^~~~~~~~~~~~~~

C:\Users\Larry\Documents\Arduino\libraries\RP2040_ISR_Servo-main\src/RP2040_ISR_Servo_Impl.h: In member function 'int RP2040_ISR_Servo::getPosition(const uint8_t&)':

C:\Users\Larry\Documents\Arduino\libraries\RP2040_ISR_Servo-main\src/RP2040_ISR_Servo.hpp:61:34: error: 'NUM_DIGITAL_PINS' was not declared in this scope

   61 | #define RP2040_MAX_PIN           NUM_DIGITAL_PINS

      |                                  ^~~~~~~~~~~~~~~~

C:\Users\Larry\Documents\Arduino\libraries\RP2040_ISR_Servo-main\src/RP2040_ISR_Servo_Impl.h:231:63: note: in expansion of macro 'RP2040_MAX_PIN'

  231 |   if ( servo[servoIndex].enabled && (servo[servoIndex].pin <= RP2040_MAX_PIN) )

      |                                                               ^~~~~~~~~~~~~~

C:\Users\Larry\Documents\Arduino\libraries\RP2040_ISR_Servo-main\src/RP2040_ISR_Servo_Impl.h: In member function 'bool RP2040_ISR_Servo::setPulseWidth(const uint8_t&, uint16_t&)':

C:\Users\Larry\Documents\Arduino\libraries\RP2040_ISR_Servo-main\src/RP2040_ISR_Servo.hpp:61:34: error: 'NUM_DIGITAL_PINS' was not declared in this scope

   61 | #define RP2040_MAX_PIN           NUM_DIGITAL_PINS

      |                                  ^~~~~~~~~~~~~~~~

C:\Users\Larry\Documents\Arduino\libraries\RP2040_ISR_Servo-main\src/RP2040_ISR_Servo_Impl.h:254:63: note: in expansion of macro 'RP2040_MAX_PIN'

  254 |   if ( servo[servoIndex].enabled && (servo[servoIndex].pin <= RP2040_MAX_PIN) )

      |                                                               ^~~~~~~~~~~~~~

C:\Users\Larry\Documents\Arduino\libraries\RP2040_ISR_Servo-main\src/RP2040_ISR_Servo_Impl.h: In member function 'uint16_t RP2040_ISR_Servo::getPulseWidth(const uint8_t&)':

C:\Users\Larry\Documents\Arduino\libraries\RP2040_ISR_Servo-main\src/RP2040_ISR_Servo.hpp:61:34: error: 'NUM_DIGITAL_PINS' was not declared in this scope

   61 | #define RP2040_MAX_PIN           NUM_DIGITAL_PINS

      |                                  ^~~~~~~~~~~~~~~~

C:\Users\Larry\Documents\Arduino\libraries\RP2040_ISR_Servo-main\src/RP2040_ISR_Servo_Impl.h:282:63: note: in expansion of macro 'RP2040_MAX_PIN'

  282 |   if ( servo[servoIndex].enabled && (servo[servoIndex].pin <= RP2040_MAX_PIN) )

      |                                                               ^~~~~~~~~~~~~~

C:\Users\Larry\Documents\Arduino\libraries\RP2040_ISR_Servo-main\src/RP2040_ISR_Servo_Impl.h: In member function 'bool RP2040_ISR_Servo::isEnabled(const uint8_t&)':

C:\Users\Larry\Documents\Arduino\libraries\RP2040_ISR_Servo-main\src/RP2040_ISR_Servo.hpp:61:34: error: 'NUM_DIGITAL_PINS' was not declared in this scope

   61 | #define RP2040_MAX_PIN           NUM_DIGITAL_PINS

      |                                  ^~~~~~~~~~~~~~~~

C:\Users\Larry\Documents\Arduino\libraries\RP2040_ISR_Servo-main\src/RP2040_ISR_Servo_Impl.h:330:31: note: in expansion of macro 'RP2040_MAX_PIN'

  330 |   if (servo[servoIndex].pin > RP2040_MAX_PIN)

      |                               ^~~~~~~~~~~~~~

C:\Users\Larry\Documents\Arduino\libraries\RP2040_ISR_Servo-main\src/RP2040_ISR_Servo_Impl.h: In member function 'bool RP2040_ISR_Servo::enable(const uint8_t&)':

C:\Users\Larry\Documents\Arduino\libraries\RP2040_ISR_Servo-main\src/RP2040_ISR_Servo.hpp:61:34: error: 'NUM_DIGITAL_PINS' was not declared in this scope

   61 | #define RP2040_MAX_PIN           NUM_DIGITAL_PINS

      |                                  ^~~~~~~~~~~~~~~~

C:\Users\Larry\Documents\Arduino\libraries\RP2040_ISR_Servo-main\src/RP2040_ISR_Servo_Impl.h:348:31: note: in expansion of macro 'RP2040_MAX_PIN'

  348 |   if (servo[servoIndex].pin > RP2040_MAX_PIN)

      |                               ^~~~~~~~~~~~~~

C:\Users\Larry\Documents\Arduino\libraries\RP2040_ISR_Servo-main\src/RP2040_ISR_Servo_Impl.h: In member function 'bool RP2040_ISR_Servo::disable(const uint8_t&)':

C:\Users\Larry\Documents\Arduino\libraries\RP2040_ISR_Servo-main\src/RP2040_ISR_Servo.hpp:61:34: error: 'NUM_DIGITAL_PINS' was not declared in this scope

   61 | #define RP2040_MAX_PIN           NUM_DIGITAL_PINS

      |                                  ^~~~~~~~~~~~~~~~

C:\Users\Larry\Documents\Arduino\libraries\RP2040_ISR_Servo-main\src/RP2040_ISR_Servo_Impl.h:369:31: note: in expansion of macro 'RP2040_MAX_PIN'

  369 |   if (servo[servoIndex].pin > RP2040_MAX_PIN)

      |                               ^~~~~~~~~~~~~~

C:\Users\Larry\Documents\Arduino\libraries\RP2040_ISR_Servo-main\src/RP2040_ISR_Servo_Impl.h: In member function 'void RP2040_ISR_Servo::enableAll()':

C:\Users\Larry\Documents\Arduino\libraries\RP2040_ISR_Servo-main\src/RP2040_ISR_Servo.hpp:61:34: error: 'NUM_DIGITAL_PINS' was not declared in this scope

   61 | #define RP2040_MAX_PIN           NUM_DIGITAL_PINS

      |                                  ^~~~~~~~~~~~~~~~

C:\Users\Larry\Documents\Arduino\libraries\RP2040_ISR_Servo-main\src/RP2040_ISR_Servo_Impl.h:383:36: note: in expansion of macro 'RP2040_MAX_PIN'

  383 |       && (servo[servoIndex].pin <= RP2040_MAX_PIN) )

      |                                    ^~~~~~~~~~~~~~**_**

Using library RP2040_ISR_Servo-main at version 1.1.2 in folder: C:\Users\Larry\Documents\Arduino\libraries\RP2040_ISR_Servo-main 

Using library Servo at version 1.0.0 in folder: C:\Users\Larry\AppData\Local\Arduino15\packages\Seeeduino\hardware\rp2040\1.12.0\libraries\Servo 

exit status 1

Error compiling for board Seeed XIAO RP2040.

Request to Clarify PIO usage

I am using the Maker PI RP2040 board by Cytron. This Servo Library works vey well on this board using GP12 thru GP15 and a PIO. The Adafruit NeoPixel uses PIO0 and SM0 but this library apparently knows this and uses PIO0 with SM1 and SM2. Can you clarify this? I ask because I am also using the NanoConnectHcSr04 library which needs single SM to function. The NanoConnectHcSr045 has documentation showing how to deciare a specific PIO and SM. However, there appears to be a bug in NanoConnectHcSr04 whereby only PIO0 will work even though it shows a parameter to select PIO1.

I was able to get all these libraries to function correctly together by allowing the NeoPixel to 1st select SM0, then allowing this library to select the next 2 SM's and then defining the NanoConnectHcSr04 to use PIO0 with SM3. So, I'd just like to know exactly which PIO and SM's this library needs. I suspect we may see future requests for PIO usage as their popularity expands. Thank you very much. Austin

Library maybe not for IDE 2.0 useable

Describe the bug

RP2040_ISR_Servo library in version 1.0.0 not visible in library manager of IDE 2.0.

following Link
https://www.arduino.cc/reference//en/libraries/rp2040_isr_servo/
describe how to include the library in the IDE library. Unfortunately the library is not visible in the library manager of IDE 2.0.
Trying to include the zip file of the library do not work too. The IDE function "sketch -> include library -> add .zip library" do not work too. It stops with a error message (library ist not valid: missing header file...)

Could it be possible to add a fully working library into the repository in order to use it with IDE 2.0?

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.