forked from LuSeKa/HoverBot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.h
34 lines (28 loc) · 670 Bytes
/
config.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*
* General configuration for HoverBot.ino
* Tested on an Arduino Mega
*/
// HARDWARE
#define PWM_CHANNEL_1 2
#define PWM_CHANNEL_2 3
#define PWM_CHANNEL_3 18
#define LEDPIN 13
#define MOTORDIR_0 -1
#define MOTORDIR_1 1
// CONTROLLER
#define KP_BALANCE 0.4
#define KD_BALANCE -0.065
#define KP_POSITION 0.015
#define KP_STEERING 0.01
#define KD_ORIENTATION 0.01
#define TILT_LIMIT 40
// RADIO CONTROL
#define ENGAGE_THRESHOLD 1500
#define PWM_CENTER 1500
// SCHEDULING
#define BLINK_INTERVAL 200
#define CONTROLLER_INTERVAL 10
#define ACTIVATION_INTERVAL 50
// SERIAL
#define BAUDRATE_ODRIVE 115200
#define BAUDRATE_PC 115200