I have the following code on the RPi Pico W:
include "pico/stdlib.h"
#define LED 25
int main()
{
gpio_init(LED);
gpio_set_dir(LED, GPIO_OUT);
while (true)
{
gpio_put(LED, 1);
sleep_ms(250);
gpio_put(LED, 0);
sleep_ms(250);
}
}
I'm using CMake
and pico-sdk
to compile it, and the code compiles with no issues. When I put the code on the Pico the led doesn't blink, I tried changing the GPIO output to other pins and connecting them to an external LEDs, but it didn't work either.
Anyone has any Idea on how to fix it?
PS: I'm using an M1 macbook to compile.