Tips to Aid in Debugging CoDrone Movement



  • I have been working on the point to point challenge and am losing track of which movement code I need to adjust or change.

    Can you suggest a way to make debugging CoDrone movement coding a bit easier? In addition to using comments in the code can the controller board produce a sound triggered by code before a section of code is run as a marker of some kind? Could this be done coding LEDs on the remote or on the CoDrone itself?



  • @johnnytechknow I think that @robolink_arnold can answer this more effectively, but one of the things he often teaches in his classes is to use beeps as markers for notifying where you are in the code. I've listed an example of doing a series of beeps right here:

    CoDrone.Buzz(4000, 10);
    CoDrone.Buzz(8000, 10);
    CoDrone.Buzz(2000, 2);
    CoDrone.Buzz(4000, 10);
    CoDrone.Buzz(8000, 10);
    

    The parameters are (tone, length)

    We recommend this technique to the kids in our classes as well, it's a great debugging tool. I like to put it in my setup as a way to beep to confirm connection was established, and as a way to signal when I've activated the emergency stop.




  • administrators

    @johnnytechknow Definitely add buzzers for debugging. Especially use them inside of if statements to verify where the drone is in the code.


Log in to reply
 

Looks like your connection to Robolink community was lost, please wait while we try to reconnect.