This commit is contained in:
AlexGyver
2026-03-12 12:19:49 +03:00
parent ed65c61636
commit 218c639738
6 changed files with 590 additions and 1 deletions
+20
View File
@@ -0,0 +1,20 @@
#include <Arduino.h>
#include <GyverMotor2.h>
// GyverMotor2<GM2::DIR_DIR> motor(5, 6);
// GyverMotor2<GM2::DIR_PWM> motor(5, 6);
GyverMotor2<GM2::DIR_PWM_INV> motor(5, 6);
// GyverMotor2<GM2::PWM_PWM_SPEED> motor(5, 6);
// GyverMotor2<GM2::PWM_PWM_POWER> motor(5, 6);
// GyverMotor2<GM2::DIR_DIR_PWM> motor(5, 6, 7);
void setup() {
// motor.setDeadtime(5);
// motor.setMinDuty(50);
// motor.setReverse(true);
}
void loop() {
int speed = map(analogRead(0), 0, 1023, -255, 255);
motor.runSpeed(speed);
}