I don’t know if it is the right topic but I need help. I am working with the raspberry pi pico and wanted to use the function analogWriteFreq() but it seems it isn’t defined in the Arduino.h despite the arduino ide having that built-in function.
I tried to use the rp2040_pwm but it didn’t change the frequency of PWM.
With PlatformIO, you by-default get the ArduinoCore-mbed core for Raspberry Pi Pico. If you are using Arduino-Pico in the Arduino, you are totally mis-matching it with what PlatformIO uses.
You can use this PR to also make PlatformIO use Arduino-Pico. E.g., overwrite your platformio.ini with
I couldn’t do that: the last error that appears is the following:
Error: VCS: Could not process command ['git', 'clone', '--recursive', 'https://github.com/earlephilhower/arduino-pico.git', 'C:\\Users\\Tiago\\.platformio\\.cache\\tmp\\pkg-installing-3c7bun1m']
I was using (previously) this configuration for platformio.ini:
I have GIT installed, I followed the steps in the link but I have the same problem, it fails on the last 3 libs.
fatal: unable to access 'https://github.com/hathach/tinyusb.git/': Could not resolve host: github.com
fatal: clone of 'https://github.com/hathach/tinyusb.git' into submodule path 'C:/Users/Tiago/.platformio/.cache/tmp/pkg-installing-y1ba5ryt/pico-sdk/lib/tinyusb' failed
Failed to clone 'lib/tinyusb'. Retry scheduled
Cloning into 'C:/Users/Tiago/.platformio/.cache/tmp/pkg-installing-y1ba5ryt/pico-sdk/lib/tinyusb'...
fatal: unable to access 'https://github.com/hathach/tinyusb.git/': Could not resolve host: github.com
fatal: clone of 'https://github.com/hathach/tinyusb.git' into submodule path 'C:/Users/Tiago/.platformio/.cache/tmp/pkg-installing-y1ba5ryt/pico-sdk/lib/tinyusb' failed
Failed to clone 'lib/tinyusb' a second time, aborting
Submodule path 'tools/libbearssl/bearssl': checked out 'f294aa022f82833941ffdf3b0f306c2072e3a26c'
Submodule path 'tools/pyserial': checked out '0e7634747568547b8a7f9fd0c48ed74f16af4b23'
fatal: Failed to recurse into submodule path 'pico-sdk'
Error: VCS: Could not process command ['git', 'clone', '--recursive', 'https://github.com/earlephilhower/arduino-pico.git', 'C:\\Users\\Tiago\\.platformio\\.cache\\tmp\\pkg-installing-y1ba5ryt']
For example, it seems that I cannot install submodule hidapi:
Submodule 'hidapi' (https://github.com/signal11/hidapi) registered for path 'pico-sdk/lib/tinyusb/tools/uf2/hidapi'
Cloning into 'C:/Users/Tiago/.platformio/.cache/tmp/pkg-installing-xfghmzwz/pico-sdk/lib/tinyusb/tools/uf2/hidapi'...
Submodule path 'pico-sdk/lib/tinyusb/tools/uf2/hidapi': checked out 'a6a622ffb680c55da0de787ff93b80280498330f'
fatal: Unable to checkout '17761f5cf9dbbf2dcf665b7c04934188add20082' in submodule path 'pico-sdk/lib/tinyusb/hw/mcu/wch/ch32v307'
But if I open any terminal (wsl,cmd,git) i can clone it withou problem.
The fix of that link didn’t solve anything.
Thanks for the help though!