This repository can be added as an extension in MakeCode. This image shows the blocks code from the last commit in master. This image may take a few minutes to refresh.
I use this to build a fan with a brushed DC Motor, speed-controlled by a potentiometer. It runs the PWM at 25kHz, which is the specified maximum for the h-bridge. This reduces high pitch noise and is ...