Project 9
Stepper Motor
|
Neff Site |
This module implements an interface for the Stepper 2 Click. More...
#include <stdint.h>
Go to the source code of this file.
Macros | |
#define | A4988_PORT PORTD |
#define | A4988_STEPS_REV 200L |
#define | A4988_ST_PIN_bp PIN0_bp |
#define | A4988_ST_PIN_bm PIN0_bm |
#define | A4988_DIR_PIN_bp PIN1_bp |
#define | A4988_DIR_PIN_bm PIN1_bm |
#define | A4988_SL_PIN_bp PIN2_bp |
#define | A4988_SL_PIN_bm PIN2_bm |
#define | A4988_RST_PIN_bp PIN3_bp |
#define | A4988_RST_PIN_bm PIN3_bm |
#define | A4988_EN_PIN_bp PIN4_bp |
#define | A4988_EN_PIN_bm PIN4_bm |
#define | A4988_PINS_gp PIN0_bp |
#define | A4988_PINS_gm (PIN0_bm | PIN1_bm | PIN2_bm | PIN3_bm | PIN4_bm) |
Functions | |
void | a4988_init (void) |
Initializes the stepper motor module. More... | |
void | a4988_reset (void) |
Resets the stepper motor module. More... | |
void | a4988_on (void) |
Switches the motor on. More... | |
void | a4988_off (void) |
Switches the motor off. More... | |
void | a4988_left (void) |
Rotating direction is left. More... | |
void | a4988_right (void) |
Rotating direction is right. More... | |
void | a4988_step (void) |
Advances one step. More... | |
This module implements an interface for the Stepper 2 Click.
The Stepper 2 Click is based on an Allegro A4988 stepper motor driver.
#define A4988_DIR_PIN_bm PIN1_bm |
#define A4988_DIR_PIN_bp PIN1_bp |
#define A4988_EN_PIN_bm PIN4_bm |
#define A4988_EN_PIN_bp PIN4_bp |
#define A4988_PINS_gm (PIN0_bm | PIN1_bm | PIN2_bm | PIN3_bm | PIN4_bm) |
#define A4988_PINS_gp PIN0_bp |
#define A4988_PORT PORTD |
#define A4988_RST_PIN_bm PIN3_bm |
#define A4988_RST_PIN_bp PIN3_bp |
#define A4988_SL_PIN_bm PIN2_bm |
#define A4988_SL_PIN_bp PIN2_bp |
#define A4988_ST_PIN_bm PIN0_bm |
#define A4988_ST_PIN_bp PIN0_bp |
#define A4988_STEPS_REV 200L |
void a4988_init | ( | void | ) |
Initializes the stepper motor module.
void a4988_left | ( | void | ) |
Rotating direction is left.
void a4988_off | ( | void | ) |
Switches the motor off.
void a4988_on | ( | void | ) |
Switches the motor on.
void a4988_reset | ( | void | ) |
Resets the stepper motor module.
void a4988_right | ( | void | ) |
Rotating direction is right.
void a4988_step | ( | void | ) |
Advances one step.
Contact | Generated by 1.8.13 |