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(DynamicLibrary _lib, 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(Pointer<MraaPwmContext> dev) MraaReturnCode
Close - mraa_pwm_close
enable(Pointer<MraaPwmContext> dev, int enable) MraaReturnCode
Enable - mraa_pwm_enable
initialise(int pin) Pointer<MraaPwmContext>
Initialise - mraa_pwm_init
initialiseRaw(int chipId, int pin) Pointer<MraaPwmContext>
Initialise raw - mraa_pwm_init_raw
maxPeriod(Pointer<MraaPwmContext> dev) int
Maximum period - mraa_pwm_get_max_period
minPeriod(Pointer<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(Pointer<MraaPwmContext> dev, bool owner) MraaReturnCode
Owner - mraa_pwm_owner
period(Pointer<MraaPwmContext> dev, double seconds) MraaReturnCode
Period - mraa_pwm_period
periodMs(Pointer<MraaPwmContext> dev, int milliseconds) MraaReturnCode
Period milliseconds - mraa_pwm_period_ms
periodUs(Pointer<MraaPwmContext> dev, int microseconds) MraaReturnCode
Period microseconds - mraa_pwm_period_us
pulseWidth(Pointer<MraaPwmContext> dev, double seconds) MraaReturnCode
Pulse width - mraa_pwm_pulsewidth
pulseWidthMs(Pointer<MraaPwmContext> dev, int milliseconds) MraaReturnCode
Pulse width milliseconds - mraa_pwm_pulsewidth_ms
pulseWidthUs(Pointer<MraaPwmContext> dev, int microseconds) MraaReturnCode
Pulse width microseconds - mraa_pwm_pulsewidth_us
read(Pointer<MraaPwmContext> dev) double
Read - mraa_pwm_read
toString() String
A string representation of this object.
inherited
write(Pointer<MraaPwmContext> dev, double percentage) MraaReturnCode
Write - mraa_pwm_write

Operators

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