GenericMotor
Description
Components used in DC motor control
It has to used with ARDUINO Motor Shield ETC as it needs to have an H-bridge DC -based motor control circuits.
It supports three control types.
One PWM & One Direction control type (ex. Arduino Motor Shield)
Two PWM control type (ex. L298)
One PWM & Two Direction control type (ex. L293)
Sketch Option has to be set because it is creating ARDUINO Sketch
Inspector
id
Controller ID
It should not overlap with other Controller ID.
controlType
Types of motor control
One PWM_One Dir
Two PWM
One PWM_Two Dir
pin1
The application varies depending on a ControlType
One PWM_One Dir: dir Pin
Two PWM: F pwm Pin
One PWM_Two Dir: pwm Pin
pin2
The application varies depending on a ControlType
One PWM_One Dir: pwm Pin
Two PWM: B pwm Pin
One PWM_Tow Dir: F dir Pin
pin3
The application varies depending on a ControlType
One PWM_One Dir: Not use
Two PWM: Not use
One PWM_Tow Dir: B dir Pin
puchValue
Min speed value to prevent not rotating the DC motor due to the static friction
(for example, when punchValue is 0.1, value is set to -0.1 or 0.1)
Value
DC Motor speed (Range -1 to 1)
0: Stop
In case of Below 0: CCW rotation
In case of Over 0 : CW rotation
It is Normalized by PWM Resolution in ArdunityApp.
Stop
Stop the motor by setting the Value 0
Wiring