mirror of
https://github.com/deadcxap/balancing-cube.git
synced 2026-01-10 20:41:45 +03:00
Organize esp32 <-> escon wiring
Remapped AO1 of M3 to an ADC1 pin. Removed all three unused AO2 DI3 wirings and relevant diodes and capacitors Corrected pins.h (Old version was not matching with old schematic btw) Updated Bom accordingly
This commit is contained in:
@@ -6,9 +6,9 @@ Motor::Motor(int pin_enable, int pin_current) : pin_enable(pin_enable), pin_curr
|
||||
pinMode(pin_enable, OUTPUT);
|
||||
|
||||
// Map pin number to channel (these must be updated if mx_current in pins.h is changed...)
|
||||
if(pin_current == 14) {
|
||||
if(pin_current == 12) {
|
||||
channel = 0;
|
||||
} else if(pin_current == 16) {
|
||||
} else if(pin_current == 18) {
|
||||
channel = 1;
|
||||
} else {
|
||||
channel = 2;
|
||||
|
||||
@@ -2,17 +2,17 @@
|
||||
#define pins_h
|
||||
|
||||
// Motor controllers
|
||||
const int M1_ENABLE = 6;
|
||||
const int M1_CURRENT = 4;
|
||||
const int M2_ENABLE = 12;
|
||||
const int M2_CURRENT = 14;
|
||||
const int M3_ENABLE = 18;
|
||||
const int M3_CURRENT = 16;
|
||||
const int M1_ENABLE = 13;
|
||||
const int M1_CURRENT = 12;
|
||||
const int M2_ENABLE = 17;
|
||||
const int M2_CURRENT = 18;
|
||||
const int M3_ENABLE = 5;
|
||||
const int M3_CURRENT = 6;
|
||||
|
||||
// Motor speeds
|
||||
const int M1_SPEED = 7;
|
||||
const int M2_SPEED = 10;
|
||||
const int M3_SPEED = 9;
|
||||
const int M1_SPEED = 10;
|
||||
const int M2_SPEED = 9;
|
||||
const int M3_SPEED = 7;
|
||||
|
||||
// IMU
|
||||
const int IMU_SDA = 47;
|
||||
|
||||
Reference in New Issue
Block a user