ESP-IDF Robot Controls

This commit is contained in:
2024-12-28 19:17:22 -05:00
parent ffa6ce2fff
commit 12b2d42ad2

View File

@@ -54,6 +54,8 @@ static void rc_get_raw_data() {
ESP_ERROR_CHECK(adc_oneshot_read(adc1_handle, ADC1_CHAN1, &adc_raw[0][1]));
ESP_LOGI("ESP IDF Robot", "ADC%d Channel[%d] Raw Data: %d", ADC_UNIT_1 + 1, ADC1_CHAN0, adc_raw[0][0]);
ESP_LOGI("ESP IDF Robot", "ADC%d Channel[%d] Raw Data: %d", ADC_UNIT_1 + 1, ADC1_CHAN1, adc_raw[0][1]);
ESP_LOGI(interpolate_raw_val("Joystick position: %d", adc_raw[0][0]));
ESP_LOGI(interpolate_raw_val("Joystick position: %d", adc_raw[0][1]));
if (do_calibration1_chan0) {
ESP_ERROR_CHECK(adc_cali_raw_to_voltage(adc1_cali_chan0_handle, adc_raw[0][0], &voltage[0][0]));