dcmotor22
2.0.0.0
|
PRVIH_PAR_RECENICA_SA_PRODUCT_PAGE_DA_ISPRATE_CELINU
[click Product page](CLICK_PRODUCT_PAGE_LINK)
We provide a library for the DC Motor 22 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 from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
This library contains API for DC Motor 22 Click driver.
dcmotor22_cfg_setup
Config Object Initialization function. dcmotor22_init
Initialization function. dcmotor22_default_cfg
Click Default Configuration function. dcmotor22_set_motor_pwm
This function sets the PWM duty cycle of the selected motor. dcmotor22_get_motor_current
This function reads the current consumption of the selected motor. dcmotor22_reset_device
This function resets the device by toggling the EN pin state. This example demonstrates the use of DC Motor 22 click board by controlling the speed of both motors over PWM duty cycle as well as displaying the motors current consumption.
The demo application is composed of two sections :
Initializes the driver and performs the click default configuration.
Controls the motor speed by changing the PWM duty cycle every 5 seconds, and displays
the motors current consumption. The duty cycle ranges from -100% to +100%. Each step will be logged on the USB UART where you can track the program flow.
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
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. UART terminal is available in all MikroElektronika compilers.