mirror of
https://github.com/alexandrebobkov/ESP-Nodes.git
synced 2025-08-29 07:51:05 +00:00
ESP-IDF RC Motors Controls
This commit is contained in:
@@ -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));
|
||||
|
Reference in New Issue
Block a user