p kj
/
MKS22-CubeFine
LPC824
Fork of CubeFine by
userDef.h
- Committer:
- beian10
- Date:
- 2016-07-04
- Revision:
- 2:7964622fb5a5
- Parent:
- 0:362c1482232c
File content as of revision 2:7964622fb5a5:
//#include <arduino.h> #include "MicroduinoPinNames.h" //#define _DEBUG //DEBUG调试 #if 0 //#define BLE_SoftSerial //软串口模式 #ifndef BLE_SoftSerial //如果没开启软串口,就开硬串口模式 #if defined(__AVR_ATmega32U4__) #define BLE_HardSerial Serial1 #else #define BLE_HardSerial Serial #endif #endif #endif #define BLE_SPEED 9600 //蓝牙接口速度 #define NRF_CHANNEL 70 //nRF通道 #define SAFE_TIME_OUT 250 //失控保护时间 #define MAX_THROTTLE 255 //最大油门 < 255 #define MAX_STEERING 512 //最大转向 < 512 #define CHANNEL_THROTTLE 1 //油门通道 #define CHANNEL_STEERING 0 //转向通道 #if defined(__AVR_ATmega32U4__) || (__AVR_ATmega1284P__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega128RFA1__) #define motor_pin0A 8 //PWM #define motor_pin0B 6 #define motor_pin1A 7 //PWM #define motor_pin1B 5 #define motor_fixL 1 //速度修正 -1到1之间 #define motor_fixR 1 //速度修正 -1到1之间 #else #if 0 #define motor_pin0A D6 //PWM #define motor_pin0B D8 #define motor_pin1A D5 //PWM #define motor_pin1B D7 #define motor_fixL -1 //速度修正 -1到1之间 #define motor_fixR -1 //速度修正 -1到1之间 #elif 1 #define motor_pin0A D8 //PWM #define motor_pin0B D6 #define motor_pin1A D7 //PWM #define motor_pin1B D5 #define motor_fixL 1 //速度修正 -1到1之间 #define motor_fixR 1 //速度修正 -1到1之间 #else #define motor_pin0A D8 //PWM #define motor_pin0B D6 #define motor_pin1A D7 //PWM #define motor_pin1B D5 #define motor_fixL -1 //速度修正 -1到1之间 #define motor_fixR -1 //速度修正 -1到1之间 #endif #endif