dcmotor 2.0.0.0
|
< DC MOTOR click is a DC motor driver board in mikroBUS form factor. It features the DRV8833RTYH-Bridge motor driver, 74HC4053 multiplexer and two screw terminals >
We provide a library for the DcMotor Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Package can be downloaded/installed directly form compilers IDE(recommended way), or downloaded from our LibStock, or found on mikroE github account.
This library contains API for DcMotor Click driver.
- Initialization function.void dcmotor_cfg_setup ( dcmotor_cfg_t *cfg );
DCMOTOR_RETVAL dcmotor_init ( dcmotor_t *ctx, dcmotor_cfg_t *cfg );
- Enable the motor function.void dcmotor_pwm_start ( dcmotor_t *ctx );
void dcmotor_enable ( dcmotor_t *ctx );
## Examples Descriptionvoid dcmotor_sleep_mode ( dcmotor_t *ctx );
This application change the speed and direction of DC Motor.
The demo application is composed of two sections :
Initialization driver enable's - GPIO, PWM initialization, set PWM duty cycle and PWM frequency, enable the motor, start PWM and start write log.
This is a example which demonstrates the use of DC Motor Click board. DC Motor Click communicates with register via PWM interface. It shows moving in the left direction from slow to fast speed and from fast to slow speed. Results are being sent to the Usart Terminal where you can track their changes.
The full application code, and ready to use projects can be installed directly form compilers IDE(recommneded) or found on LibStock page or mikroE GitHub accaunt.
Other mikroE Libraries used in the example:
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB UART 2 Click or RS232 Click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all Mikroelektronika compilers, or any other terminal application of your choice, can be used to read the message.