PullupDev/src/config.h

43 lines
1.2 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#pragma once
////////////
// 定义公共结构,变量,硬件接口等
///
//
#define VERSION "0.90" //版本
// 硬件接口定义////////////////////////////
// 按钮
#define BTN_UP 23 // 收线开关 接线BTN_UP---GND
#define BTN_DOWN 22 // 放线开关
#define BTN_CT 21 // 到顶检测开关
#define BTN_TEST 18 // 测试开关
// 称重传感器- HX711
#define LOADCELL_DOUT_PIN 13 //16
#define LOADCELL_SCK_PIN 33 //17
///////////////////////////////////////////
#define SERVO_PIN 14 // 锁定舵机PWM控制脚
////LED
#define LED_DATA_PIN 25
// Moto-CAN
#define MOTO_CAN_RX 26
#define MOTO_CAN_TX 27
///serial1
#define SERIAL_REPORT_TX 5
#define SERIAL_REPORT_RX 18
/////
#define WEIGHT_SCALE 276 // 这是缩放值根据砝码实测516.f
#define TM_INSTORE_DELAY 200 // 入仓动力延时关闭时间 ms
enum HookStatus
{
HS_UnInit, // 还未初始化
HS_Down, // 货物下放中
HS_DownSlow, // 货物慢速下放中 --接近地面慢速,不受设置速度影响
HS_WaitUnhook, // 等待脱钩
HS_Up, // 回收中
HS_InStore, // 入仓中 --慢速,不受设置速度影响
HS_Locked, // 已到顶部锁定
HS_Stop // 已停止
};