[Python] Calibrate Donkey Car via raspberrypi4 with l298n motor (* no 16 channel servo driver )

Discussão em 'Python' iniciado por Stack, Julho 2, 2025.

  1. Stack

    Stack Membro Participativo

    So I am building a donkey car in raspberry pi 4 2gb. I have installed the software and all libraries needed and made changes in myconfig.py. My car runs properly, but I couldn't calibrate it to turn properly (left and right) according to https://docs.donkeycar.com/guide/calibrate/. If anyone could help it would be great.

    code changes in myconfig.py

    # #CAMERA
    CAMERA_TYPE = "WEBCAM"
    IMAGE_W = 200
    IMAGE_H = 120

    DRIVE_TRAIN_TYPE = "DC_TWO_WHEEL_L298N"

    DC_TWO_WHEEL_L298N = {
    "LEFT_FWD_PIN": "RPI_GPIO.BOARD.16", # TTL output pin enables left wheel forward
    "LEFT_BWD_PIN": "RPI_GPIO.BOARD.18", # TTL output pin enables left wheel reverse
    "LEFT_EN_DUTY_PIN": "RPI_GPIO.BOARD.22", # PWM pin generates duty cycle for left motor speed
    "RIGHT_FWD_PIN": "RPI_GPIO.BOARD.15", # TTL output pin enables right wheel forward
    "RIGHT_BWD_PIN": "RPI_GPIO.BOARD.13", # TTL output pin enables right wheel reverse
    "RIGHT_EN_DUTY_PIN": "RPI_GPIO.BOARD.11", # PWM pin generates duty cycle for right wheel speed
    }

    Continue reading...

Compartilhe esta Página