This commit is contained in:
ethan merchant 2024-01-27 22:39:46 -05:00
parent 629e905914
commit 93ccd8e77f

View file

@ -10,11 +10,11 @@ struct ServoPin {
Servo servo; Servo servo;
int pin; int pin;
}; };
// Recommended PWM GPIO pins on the ESP32 include 2,4,12-19,21-23,25-27,32-33
ServoPin servos[6] = { ServoPin servos[6] = {
{Servo(), 4 }, {Servo(), 16}, {Servo(), 2 }, {Servo(), 4 },
{Servo(), 17}, {Servo(), 5 }, {Servo(), 5 }, {Servo(), 18},
{Servo(), 18}, {Servo(), 19} {Servo(), 19}, {Servo(), 21} // 19 and 21 are untested
}; };
// braille alphabet // braille alphabet
@ -202,6 +202,6 @@ void loop()
// myservo.write(bindex); // myservo.write(bindex);
for (int i = 0; i < 6; i++) { for (int i = 0; i < 6; i++) {
servos[i].servo.write(bindex); servos[i].servo.write(brailleAlphabet[bindex].servoStates[i] * 180);
} }
} }