C# Class HexapiBackground.Hardware.Pca9685

Mostrar archivo Open project: Slimordium/Hexapi_Hexapod

Public Methods

Method Description
SetPin ( int pin, double dutyCycle, bool invertPolarity = true ) : void

toggles the pulse for a given pin; note: to completely shut off an LED, send in a value of 4096

SetPulseParameters ( double value, bool invertPolarity = false ) : void

toggles the pulse for all pins; note: to completely shut off an LED, send in a value of 4096

Private Methods

Method Description
Pca9685 ( ) : System

Adafruit 12bit, 16 channel, I2C PWM controller. Adapted from the Adafruit library for the Arduino

Reset ( ) : void
SetAllPwm ( ushort on, ushort off ) : void
SetDesiredFrequency ( double frequency ) : double
SetPwm ( byte channel, ushort on, ushort off ) : void
Start ( ) : Task

Method Details

SetPin() public method

toggles the pulse for a given pin; note: to completely shut off an LED, send in a value of 4096
public SetPin ( int pin, double dutyCycle, bool invertPolarity = true ) : void
pin int the pin between 0 and 15
dutyCycle double value between 0-4095; if maximum value exceeded, 4095 will be used
invertPolarity bool
return void

SetPulseParameters() public method

toggles the pulse for all pins; note: to completely shut off an LED, send in a value of 4096
public SetPulseParameters ( double value, bool invertPolarity = false ) : void
value double value between 0-4095; if maximum value exceeded, 4095 will be used
invertPolarity bool
return void