Line Tracking Microbit Cutebot Pro Not Work

tinyurl.com/5n8cw88h
tinyurl.com/2y9kb7hv : This is the simple line tracking code.
I did calibrate the IR sensors and got the green lights that it was successful.
Still does not track the black line using the Elecfreaks tracking map.

Пікірлер: 4

  • @jdonwells
    @jdonwells4 күн бұрын

    Also the values I am using are Kp = 0.02 and Kd = 0.015. Elecfreaks is recommending Kp = 0.05 and Kd = 0.06. For me those are unstable values.

  • @makecodeandhardware1395

    @makecodeandhardware1395

    4 күн бұрын

    Difficult to believe that this was not tested well by Elecfreaks before offering it as a lesson with the hardware bot car. I have found this also with MakeCode and Microbit for Jacdac with Kittenbot Kits hardware: Software developers do not seem to have hardware in their possession and so push out the programming and say : "It should work". Then we find, after buying the kits, they do not work as advertised.

  • @jdonwells
    @jdonwells4 күн бұрын

    In that code with the if else cascade I suspect the and needs to be or. One of the issues with the "fused offset value" aka error seems to be it is relatively insensitive when the robot is on the line. That is, the error is not linear with how far off the line you are. With a high enough Kp you can get it to follow a straight line very nicely. But on turns it still behaves like the classic Bang-Bang algorithm. I am using Kp of 0.02 and Kd of 0.015, much, much smaller that what is in the lesson. Anyway, it does work, just not well. I am going to experiment with my own error calculations next.

  • @makecodeandhardware1395

    @makecodeandhardware1395

    4 күн бұрын

    Thank you for this note, @jdonwells. It's great to have someone who knows about programming to offer helpful hints. I am not at all a coder nor programmer.