How to make a Timer Interrupt version of blink LED #589
-
I am trying to learn how to use a timer interrupt on the pico to make a basic interrupt version of blink. I'm currently very stuck because I can't find resources about timers and interrupts using C++ and this core on the Arduino IDE or PlatformIO. I have programmed interrupts on the mega 2560 using the port registers like in this post but it appears to be different on the pico. Considering this I have no idea how to get interrupts working and I keep hitting a dead end with googling. When googling I keep getting either micropython (not C++) or using the Pico C SDK which doesn't seem to work how I thought. I also can't find any timer interrupt stuff in the documentation for this core located here.
which is based of of this example code and the basic blink code. I thought that "A complete copy of the PICO SDK is included with the Arduino core, and all functions in the core are available inside the standard link libraries." meant that I could just do #include "pico/stdlib.h" but this just says not found. I've only really installed libraries using the library manager in the Arduino IDE or VSCode with platformIO so I don't really know how it works. I'm probably misunderstanding something but I don't know what. Any help on how to use timer interrupts on the pico would be really helpful? My future goal is to use this interrupt to drive stepper motor step and direction pins for 6 to 8 motors with complex movement. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Try my RPI_PICO_TimerInterrupt library, and possible RP2040_PWM for future PWM-related motor control. |
Beta Was this translation helpful? Give feedback.
Try my RPI_PICO_TimerInterrupt library, and possible RP2040_PWM for future PWM-related motor control.