|
Treehopper C# API
|
Hardware PWM manager More...
Public Member Functions | |
| override string | ToString () |
| Gets a string representing the state of the Hardware PWM manager More... | |
Properties | |
| HardwarePwmFrequency | Frequency [get, set] |
| Gets or sets the PWM frequency of the pin, selected from HardwarePwmFrequency. More... | |
| double | MicrosecondsPerTick [get] |
| Get the number of microseconds per tick More... | |
| double | PeriodMicroseconds [get] |
| Get the number of microseconds per period More... | |
| int | FrequencyHz [get] |
| Get an integer representing the current PWM frequency More... | |
Hardware PWM manager
This class wouldn't typically be exposed to the user, but it provides one useful property: HardwarePwmFrequency.
With it, you can change the frequency that PWM1, PWM2, and PWM3 operate at. By default, the board uses a frequency of 732Hz, which helps avoid any trace of flicker when driving LEDs or other lighting. If you're driving motors or other inductive loads, you may wish to lower the frequency to reduce switching losses, or to lower the tone of the motor.
| override string ToString | ( | ) |
Gets a string representing the state of the Hardware PWM manager
|
getset |
Gets or sets the PWM frequency of the pin, selected from HardwarePwmFrequency.
Defaults to 732 Hz.
|
get |
Get the number of microseconds per tick
|
get |
Get the number of microseconds per period
|
get |
Get an integer representing the current PWM frequency