Open BryanCrotaz opened 4 years ago
Try a cast. The readme gives the following example:
var range = 100;
var pin = (GpioPin)Pi.Gpio[BcmPin.Gpio24];
pin.PinMode = GpioPinDriveMode.Output;
pin.StartSoftPwm(0, range);
Oh that's soooo dodgy! Assuming that the implementation of an interface is an exact class is ripe with error potential.
Yes. I don't know why the maintainers designed it so. Maybe they'd like to chip in?
I've submitted a few improvement PRs but they're withering on the vine
We are looking for maintainers, you can apply at https://adoptoposs.org/p/67b02bee-a00e-446a-a321-c1a6449014bc
IGpioPin
does not give access to all PWM functions.In Workbench, the Servo demo should take an
IGpioPin
in the constructor, not aGpioPin
.Alternatively explain in docs how to get a
GpioPin
instance fromPi.Gpio[bcmPinNumber]