TB6612FNG.Module (tb6612fng v0.1.0)
Driver for TB6612FNG Module.
Link to this section Summary
Functions
Returns a specification to start this module under a supervisor.
Sets the standby pin to high, disabling Standby mode.
Sets the standby pin to low. Will stop both motors if they are currently turning, but will retain whatever settings they had set, so if standby mode is disabled, they will start again. Standby mode is a high impedance/low power mode.
Returns the config of the module. Mostly used for troubleshooting/accessing the standby reference directly.
Sets the output of the specified motor in a specific direction.
Link to this section Functions
child_spec(init_arg)
Returns a specification to start this module under a supervisor.
See Supervisor.
disable_standby(name \\ __MODULE__)
Sets the standby pin to high, disabling Standby mode.
enable_standby(name \\ __MODULE__)
Sets the standby pin to low. Will stop both motors if they are currently turning, but will retain whatever settings they had set, so if standby mode is disabled, they will start again. Standby mode is a high impedance/low power mode.
get_config(name)
Returns the config of the module. Mostly used for troubleshooting/accessing the standby reference directly.
set_output(motor, direction, output)
Sets the output of the specified motor in a specific direction.
Accepts three parameters:
name- The name (atom) of the GenServer controlling the motor.direction- Either:cwfor clockwise or:ccwfor counter-clockwise rotationoutput- The PWM output requested. This should be an integer value between 0 and 1_000_000