MraaPwm class

The PWM MRAA API

PWM is the Pulse Width Modulation interface to MRAA. It allows the generation of a signal on a pin. Some boards may have higher or lower levels of resolution so make sure you check the board & pin you are using before hand.

Constructors

MraaPwm(MraaImpl _impl, bool _noJsonLoading, bool _useGrovePi)
Construction

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

close(MraaPwmContext dev) MraaReturnCode
Close - mraa_pwm_close
enable(MraaPwmContext dev, int enable) MraaReturnCode
Enable - mraa_pwm_enable
initialise(int pin) MraaPwmContext
Initialise - mraa_pwm_init
initialiseRaw(int chipId, int pin) MraaPwmContext
Initialise raw - mraa_pwm_init_raw
maxPeriod(MraaPwmContext dev) int
Maximum period - mraa_pwm_get_max_period
minPeriod(MraaPwmContext dev) int
Minimum period - mraa_pwm_get_min_period
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
owner(MraaPwmContext dev, bool owner) MraaReturnCode
Owner - mraa_pwm_owner
period(MraaPwmContext dev, double seconds) MraaReturnCode
Period - mraa_pwm_period
periodMs(MraaPwmContext dev, int milliseconds) MraaReturnCode
Period milliseconds - mraa_pwm_period_ms
periodUs(MraaPwmContext dev, int microseconds) MraaReturnCode
Period microseconds - mraa_pwm_period_us
pulseWidth(MraaPwmContext dev, double seconds) MraaReturnCode
Pulse width - mraa_pwm_pulsewidth
pulseWidthMs(MraaPwmContext dev, int milliseconds) MraaReturnCode
Pulse width milliseconds - mraa_pwm_pulsewidth_ms
pulseWidthUs(MraaPwmContext dev, int microseconds) MraaReturnCode
Pulse width microseconds - mraa_pwm_pulsewidth_us
read(MraaPwmContext dev) double
Read - mraa_pwm_read
toString() String
A string representation of this object.
inherited
write(MraaPwmContext dev, double percentage) MraaReturnCode
Write - mraa_pwm_write

Operators

operator ==(Object other) bool
The equality operator.
inherited