49 lines
1.1 KiB
C
49 lines
1.1 KiB
C
#ifndef CONFIG_H
|
|
#define CONFIG_H
|
|
|
|
#include "math.h"
|
|
|
|
#define BAUDRATE (9600)
|
|
|
|
// Pins
|
|
#define PIN_PB0 (8)
|
|
#define PIN_PD6 (6)
|
|
#define PIN_PD7 (7)
|
|
#define PIN_PD3 (3)
|
|
#define PIN_PB1 (9)
|
|
#define PIN_PB2 (10)
|
|
#define PIN_PD4 (4)
|
|
#define PIN_PD2 (2)
|
|
#define PIN_MOSI (11)
|
|
|
|
#define PIN_Y_PULSE (PIN_PB0)
|
|
#define PIN_Y_ENABLE (PIN_PD6)
|
|
#define PIN_Y_DIRECTION (PIN_PD7)
|
|
#define PIN_Y_HOME (PIN_PD3)
|
|
|
|
#define PIN_X_PULSE (PIN_PB2)
|
|
#define PIN_X_ENABLE (PIN_PB1)
|
|
#define PIN_X_DIRECTION (PIN_MOSI)
|
|
#define PIN_X_HOME (PIN_PD4)
|
|
|
|
#define PIN_LASER (PIN_PD2)
|
|
|
|
// Stepper ratio [step/rad]
|
|
#define STEP_RATIO_X (6432 / M_PI)
|
|
#define STEP_RATIO_Y (6432 / M_PI)
|
|
|
|
// Offset between home and zero [step]
|
|
#define ZERO_OFFSET_X (0)
|
|
#define ZERO_OFFSET_Y (2500)
|
|
|
|
// Offset between turret and lidar [cm]
|
|
// Distance between the lidar optical center and the vertical laser (should be 0
|
|
// unless mechanical constraints)
|
|
#define OFFSET_X (0)
|
|
// Distance between the lidar optical center and the horizontal laser
|
|
#define OFFSET_Y (21)
|
|
// Distance between the surface and the turret motors axis
|
|
#define OFFSET_Z (166)
|
|
|
|
#endif
|