Students opening Ardublock without opening ArduinoIDE. The Ardublock must be opened from within the IDE to link to the compiler and robot.
Students pressing “Upload to Arduino” more than once in short succession. This breaks the compiler. I fix it by pressing the upload button directly on the IDE and it clears the problem.
Students changing the processor on the NANO compiler. The processor auto-selects to the ATmega328, but if students select the ATmega168, it breaks. Also, if they update the boards, you'll need to select "ATmega328 (Old Bootloader)".
Students installing the Arduino backwards into the red expansion board. Besides causing a host of other issues, it also cannot upload.
Students having anything plugged into ports 0 and 1 on the red expansion board will not allow an upload to occur.
Try re-uploading the code to ensure it has the code you expect.
Replace the batteries. If the batteries are low, it will restart the program when the voltage drops below a threshold. Adding a delay, beep, or blink at the start can help diagnose this problem because that should only happen when the program starts.
If the batteries are placed over the caster, it will act more like a rudder and steer the car. Placing the batteries between the servos with a zip tie prevents this.
Adjust the values in the code closer to 90 to slow down the servo that’s turning too fast
Check the wiring.
Double check the pin number in the code.
Replace speaker.
Change the frequency. These speakers are loudest around 2000 Hz. The further from that value, the quieter it will be.
Adding a resister in series with the speaker will make it quieter.
Check the wiring.
Use the Serial Monitor to ensure you are getting good data from the sensor
Check that it's plugged in the correct direction.
Check to see if it turns/stops/reverses direction at other angles
Adjust the angle in the code to make it turn or stop as you want
If servo only turns in one direction, CAREFULLY adjust the silver set screw on the bottom of the servo to recenter it. Near the ends of the adjustment, the servo can be twitchy. You want it right in the middle
If the servo isn’t moving but the motor inside is making noise, try slowly and gently turning the wheel. Does it turn the motor and feel like other servos? If it does turn normally, see if there’s a sticking point, then drive it and see if pushing the wheel slightly past the sticking point frees it. This could be a gear starting to break. If turning it by hand doesn’t feel and sound like other servos, one or more of the gears likely have broken teeth. This can happen if the robot is dropped or if someone tries to turn the wheel by hand too quickly or (very rarely) if the servo is driving and someone tries to stop it by hand.
If the servo isn’t moving and the motor isn’t making noise, it’s probably a wiring issue. It could be something external (how the student wired the servo to the Arduino) or internal (the circuitry in the servo may have broken). Double check the external wiring and if it isn’t that, send it to me and get the student a replacement.