ESP-IDF Robot Controls

This commit is contained in:
2024-12-31 03:38:33 -05:00
parent b1c0cb5629
commit 0a0e14e4e4

View File

@@ -74,6 +74,8 @@ static void rc_get_raw_data() {
ESP_LOGW("RC", "LEFT"); ESP_LOGW("RC", "LEFT");
else if ((y < 0 && y > -200) && (x > 1000)) else if ((y < 0 && y > -200) && (x > 1000))
ESP_LOGW("RC", "RIGHT"); ESP_LOGW("RC", "RIGHT");
else
ESP_LOGW("RC", "STAND STILL");
/*// Cut-off readings that have values less than 700, i.e. when joystick is centered /*// Cut-off readings that have values less than 700, i.e. when joystick is centered
if (rescale_raw_val(adc_raw[0][1]) < -500 && rescale_raw_val(adc_raw[0][0]) < 500) { if (rescale_raw_val(adc_raw[0][1]) < -500 && rescale_raw_val(adc_raw[0][0]) < 500) {