ESP-IDF RC Motors Controls

This commit is contained in:
2024-12-31 05:01:23 -05:00
parent 29cbcaf217
commit 7f726482ea

View File

@@ -1025,10 +1025,19 @@ void app_main(void)
ledc_update_duty(MTR_MODE, MTR_FRONT_LEFT);
ledc_set_duty(MTR_MODE, MTR_FRONT_RIGHT, m.motor2_rpm_pcm);
ledc_update_duty(MTR_MODE, MTR_FRONT_RIGHT);
ledc_set_duty(MTR_MODE, MTR_FRONT_LEFT_REV, m.motor3_rpm_pcm);
ledc_update_duty(MTR_MODE, MTR_FRONT_LEFT_REV);
ledc_set_duty(MTR_MODE, MTR_FRONT_RIGHT_REV, m.motor4_rpm_pcm);
ledc_update_duty(MTR_MODE, MTR_FRONT_RIGHT_REV);
//ESP_LOGW(TAG, "Motor 1 PWM: %d", var);
ESP_LOGW(TAG, "Motor 1 PWM: %d", m.motor1_rpm_pcm);
//ESP_LOGW(TAG, "Motor 2 PWM: %d", var);
ESP_LOGW(TAG, "Motor 2 PWM: %d", m.motor2_rpm_pcm);
ESP_LOGW(TAG, "Motor 1 PWM: %d", m.motor1_rpm_pcm);
//ESP_LOGW(TAG, "Motor 2 PWM: %d", var);
ESP_LOGW(TAG, "Motor 2 PWM: %d", m.motor2_rpm_pcm);
}
//ESP_ERROR_CHECK(adc_continuous_stop(handle));