Commit c889e6a8 authored by Jonathan Glück's avatar Jonathan Glück

new library MKII

parent 462dbb3d
Pipeline #76 failed with stage
......@@ -1167,11 +1167,9 @@ uint8_t CodeRacerMKII::drive_left_speed() {
void CodeRacerMKII::_analog_write(uint8_t pin, uint8_t speed) {
if (pin == _drive_left_enable_pin) {
//_drive_left_speed = speed;
ledcWrite(DRIVE_PWM_LEFT_CHANNEL, speed);
}
if (pin == _drive_right_enable_pin) {
//_drive_right_speed = speed;
ledcWrite(DRIVE_PWM_RIGHT_CHANNEL, speed);
}
}
......
......@@ -49,14 +49,14 @@ void loop() {
iAbstand= coderacer.usonic_measure_cm();
while (iAbstand<20)
while (iAbstand<25)
{
coderacer.drive_backward();
iAbstand= coderacer.usonic_measure_cm();
}
coderacer.stop_driving();
delay(1000);
coderacer.turn_left(300);
coderacer.turn_left(400);
delay(1000);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment