After hitting “Run” in blockly or python, the robot does not respond. After pressing the “Run” button, the program just changes back to it’s initial state without running. This happens when my students copy the code from the curriculum website and paste it into the coding environment. For example, in the Encoders section, Driving a Distance, both of the programs provided in the lesson do not work when copied to the coding environment. Please help!
In the XRPExamples directory there is a program called installation_verification.py Run this program and it will run through checking each part of the XRP to make sure it is running correctly. If something is not running correctly check that the connectors are plugged in all the way and that they are plugged into the correct connector.
The other problem you may see is that some commands wait until they are done, such as asking the XRP to drive straight for 10cm. The command will not go on to the next command until the XRP has moved 10cm. But if you use a command like set_effort, then the command will set the motor to that effort level and immediately return. If that is the only statement in the program, then the motor will be set to that effort and a few milliseconds later the program will end and the motors will stop. In that case you can add something to the program to wait, such as a sleep statement, or looking for the user button to be pushed on the control board.
Let us know if this helped or if you run into other issues.