first commit
This commit is contained in:
1
code/SmallCart/SmallCartMain/src/config/.pydio
Normal file
1
code/SmallCart/SmallCartMain/src/config/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
7c54a6e6-291e-460a-b441-b17b9557640e
|
||||
0
code/SmallCart/SmallCartMain/src/config/config.cpp
Normal file
0
code/SmallCart/SmallCartMain/src/config/config.cpp
Normal file
52
code/SmallCart/SmallCartMain/src/config/config.h
Normal file
52
code/SmallCart/SmallCartMain/src/config/config.h
Normal file
@@ -0,0 +1,52 @@
|
||||
#ifndef _CONFIG_H__
|
||||
#define _CONFIG_H__
|
||||
#include <Arduino.h>
|
||||
|
||||
// 自己家中的 2.4G wifi名称
|
||||
#define WifiName "bmy"
|
||||
// 自己家中的 2.4G wifi密码
|
||||
#define WifiPwd "lb714500"
|
||||
|
||||
// WiFiManager 自动生成的wifi名和密码,用于小车的自动配网!
|
||||
#define AutoWiFiManagerName "AutoWiFiManager"
|
||||
#define AutoWiFiManagerPwd "123456789"
|
||||
|
||||
#define WebSocketsPort 81
|
||||
#define WebServerPort 80
|
||||
|
||||
// 蜂鸣器
|
||||
#define BuzzerPin 1 // TX 引脚
|
||||
|
||||
// 双闪灯(转向灯)
|
||||
#define BottomLeftPin 10 // SD3 引脚
|
||||
#define BottomRightPin 3 // RX 引脚
|
||||
|
||||
// 小车的五种 状态码
|
||||
#define STOP 0 // 停止
|
||||
#define FORWARD 1 // 前进
|
||||
#define BACKWARD 2 // 后退
|
||||
#define TURNLEFT 3 // 左转
|
||||
#define TURNRIGHT 4 // 右转
|
||||
#define STRAIGHT 5 // 直行
|
||||
|
||||
// 电机驱动接线说明
|
||||
// D5, D6, D8, D2 是 PWM引脚,可以用来控制减速电机的速度 0 ~ 255
|
||||
// D0, D1, D3, D4, D7 是普通引脚,可以通过高低电压来控制车轮转向
|
||||
#define leftMotor1 16 // D0 红线
|
||||
#define leftMotor2 5 // D1 褐线
|
||||
#define leftPWM 4 // D2 橙线
|
||||
|
||||
#define rightMotor1 0 // D3 黑线
|
||||
#define rightMotor2 2 // D4 白线
|
||||
#define rightPWM 14 // D5 灰线
|
||||
|
||||
// 转向舵机
|
||||
#define servoPin 13 // D7 白线
|
||||
|
||||
|
||||
class Config
|
||||
{
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user