stepper11 2.0.0.0
main.c File Reference

Stepper11 Click example. More...

#include "board.h"
#include "log.h"
#include "stepper11.h"

Functions

void application_init (void)
 
void application_task (void)
 
int main (void)
 

Detailed Description

Stepper11 Click example.

Description

This example showcases the device's ability to control the motor. It initializes the device for control and moves the motor in two directions in a variety of resolutions for 360 degrees.

The demo application is composed of two sections :

Application Init

Initialization of communication modules(I2C, UART) and additional pins for control of device. Then sets default configuration that enables device for motor control.

Application Task

Firstly it rotates motor in CW direction for 360 degrees in FULL step resolution. Then changes direction in CCW and rotates backwards 360 degrees in 2 different step resolutions (Quarter and 1/16) in 180 degrees each.

Author
Luka Filipovic

Function Documentation

◆ application_init()

void application_init ( void )

< Logger config object.

< Click config object.

Logger initialization. Default baud rate: 115200 Default log level: LOG_LEVEL_DEBUG

Note
If USB_UART_RX and USB_UART_TX are defined as HAL_PIN_NC, you will need to define them manually for log to work. See LOG_MAP_USB_UART macro definition for detailed explanation.

◆ application_task()

void application_task ( void )

◆ main()

int main ( void )