Building the HUB-ee Buggy

This Tutorial is Retired!

This tutorial covers concepts or technologies that are no longer current. It's still here for you to read and enjoy, but may not be as useful as our newest tutorials.

Contributors: Nick Poole
Favorited Favorite 4


If your HUB-ee Buggy isn't acting like it's supposed to, there are a couple of easily solved problems that might be responsible:

"It's just spinning in circles"

When you put your hand in front of the sensor, does it start going straight or backwards? If this is the case, then one of your motors is either wired backwards or running backwards, depending on how you wanna look at it. No worries! Just go into the code and change the direction values for one of your motors.

If it isn't responding at all to sensor input, you might have the sensor threshold set too high or low. Play with the threshold variable in your code. Also, make sure that your sensor is wired to the right analog input.

**"It doesn't turn on" **

Check your batteries, first and foremost. If you have a multimeter, check the battery pack output by placing the positive probe inside the barrel connector and placing the ground probe against the outside of the connector. You should see about 6VDC. If it's lower than that, the Redboard's voltage regulator may be "dropping out" too much of the voltage to power the processor and the motors.

If you've confirmed that your batteries are okay but your board still won't turn on, check for short circuits. Anywhere where a power connection might be connected directly to a ground is gonna mess up your 'bot.

**"It's on, but not moving" **

Double check your motor wiring. If that looks okay, then look at your code, and make sure it's able to execute up to the point where the wheels are supposed to move. You can check by placing a digitalWrite(13, HIGH) right below the motor commands. That way, if the code makes it to that point, the on-board LED will light up.

If that works but the motors still aren't moving, check that you've declared the right motor pins in your code.

"It tips over when it sees an obstacle"

Whoa there, Turbo. Sounds like the motors are cranking too hard. Change the analogWrite() statements in the code to something lower. Or, if you're really clever, add a new analogWrite() statement before changing the wheel direction to make your Buggy slow down after it encounters an obstacle.