CJQ4435 Class
- ID: cjq4435
- Name: MOSFET
- Other Names: CJQ4435
- Category: electric
- Manufacturer: seeed
- Connection: gpio pwm
- Kit: robok
UPM module for the CJQ4435 MOSFET. It was developed using the Grove MOSFET module, but could be used with any MOSFET. A MOSFET is like a switch, but it can switch much faster than a mechanical relay. Here, we implement support via MRAA pulse width modulation (PWM) functions. Note: available periods vary depending on the capabilities of your platform.
Item Index
Methods
CJQ4435
-
pin
CJQ4435 constructor
Parameters:
-
pin
NumberDigital pin to use; this pin must be PWM-capable
Returns:
setPeriodUS
-
us
Sets a period in microseconds
Parameters:
-
us
NumberPeriod in microseconds
setPeriodMS
-
ms
Sets a period in milliseconds
Parameters:
-
ms
NumberPeriod in milliseconds
setPeriodSeconds
-
seconds
Sets a period in seconds
Parameters:
-
seconds
NumberPeriod in seconds
enable
-
enable
Enables output
Parameters:
-
enable
BooleanEnables PWM output if true, disables otherwise
setDutyCycle
-
dutyCycle
Sets a duty cycle. Duty cycle is a floating-point number between 0.0 (always off) and 1.0 (always on). It represents a proportion of time, per period, during which the output is driven high.
Parameters:
-
dutyCycle
NumberDuty cycle to use
on
()
Shortcut to turn the output to continuous on (high)
off
()
Shortcut to turn the output to continuous off (low)