The basic question here is how to pass a MicroPython object to a C function in a custom C module. In this case a PWM object. There are probably many ways to do this. Here is my way of doing it. It may ...