From a7bdd21c343fbe0371f38d1afb95a5892a33f1b3 Mon Sep 17 00:00:00 2001 From: Alexandre Bobkov Date: Wed, 6 Aug 2025 03:44:10 -0400 Subject: [PATCH] pwm --- ESP-IDF_Robot/main/rc.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ESP-IDF_Robot/main/rc.h b/ESP-IDF_Robot/main/rc.h index ad9fc9607..f6760e975 100644 --- a/ESP-IDF_Robot/main/rc.h +++ b/ESP-IDF_Robot/main/rc.h @@ -98,6 +98,13 @@ static void update_pwm (int rc_x, int rc_y) { if (1024 < x < 2048 && 1024 < y < 2048) { }*/ + // Smooth update + if (y >= 1500) { + m.motor1_rpm_pcm = y - x; + m.motor2_rpm_pcm = ; + } + // ------------- + // Turn Left if (x == 8190 && y == -8190) { m.motor1_rpm_pcm = 6172;