Город МОСКОВСКИЙ
00:03:09

Raspberry Pi Pico (RP2040) PWM with SDK

Аватар
Пошаговый Python
Просмотры:
53
Дата загрузки:
02.12.2023 16:25
Длительность:
00:03:09
Категория:
Технологии и интернет

Описание

I have been tinkering with the PWM options from the Pico as of late. The SDK has 30 functions related to PWM! That is a lot, to say the least.

I wanted a simple way to give a frequency and duty cycle to run with and ended up borrowing some of the MicroPython code for PWM. I have full credit listed in the example. I modified the code to work without Python and to be standalone as well as a few other small changes.

It seems to work fine up to 10khz, but seems to not give good settings past that reliably. I want to try the MP on a chip and see what it does there.

The example code is here: https://pastebin.com/uVMigyFN

Рекомендуемые видео