Loading Project Blueprint...
Check off the parts you have on your desk before starting assembly:
Follow these structural steps to align motors, snap chassis pieces, and seat the Quarky microcontroller securely.
Align the dual DC gearmotors into the acrylic motor brackets. Fasten them using the two M3x30mm screws through the designated mounting holes on the base plate.
Press the rubber tread wheels firmly onto the motor shafts until they click. Bolt the omnidirectional nylon castor wheel to the underside of the front bumper.
Snap the Quarky microcontroller into the top acrylic protective tray. Mount the ultrasonic eyes or camera module to the front bracket using the plastic push-rivets.
Ensure the power switch is in the OFF position before plugging in any wires or sensor headers.
Never force JST connectors in reverse. Red wire is always Positive (3.3V / 5V), and Black wire is always Ground (GND).
Drag and drop the following block stacks to configure your robot's decision loop:
[Set Motor M1 and M2 speed to 70%][Clear 35-LED Matrix screen][Play Startup Sound "Happy Chime"][If then] • [Stop All Motors]• [Show Surprise Face on LED Matrix]• [Drive Backwards for 0.6 seconds]• [Turn Right 90 degrees][Else]• [Drive Forward at speed 70%]• [Show Happy Eyes on LED Matrix]# ==============================================================
# StemSpace Autonomous Robot Controller Script
# Powered by Quarky Hardware SDK
# ==============================================================
import time
from quarky import Quarky, Display, Sound
# Initialize the robot hardware brain
robot = Quarky()
screen = Display()
buzzer = Sound()
SAFE_DISTANCE_CM = 15.0
BASE_SPEED = 70
def startup_sequence():
screen.show_pattern("happy_face")
buzzer.play_tone("C5", duration=0.2)
time.sleep(0.1)
buzzer.play_tone("G5", duration=0.3)
print("[StemSpace] System initialized and ready to roam!")
def run_obstacle_avoidance():
startup_sequence()
while True:
distance = robot.get_distance() # In centimeters
if distance < SAFE_DISTANCE_CM:
# Danger! Obstacle ahead: Reverse and pivot
robot.stop()
screen.show_pattern("alert_eyes")
buzzer.play_beep()
robot.move_backward(speed=BASE_SPEED)
time.sleep(0.5)
robot.turn_right(speed=BASE_SPEED)
time.sleep(0.6)
else:
# Path is clear: Cruise forward
screen.show_pattern("happy_face")
robot.move_forward(speed=BASE_SPEED)
time.sleep(0.05)
if __name__ == "__main__":
try:
run_obstacle_avoidance()
except KeyboardInterrupt:
robot.stop()
print("[StemSpace] Robot safely parked.")
Encountered an issue during testing? Here are the 3 most common quick fixes:
speed=70 to speed=-70.
Once your basic robot works, try these open-ended engineering quests:
Program a celebration victory dance with flashing matrix lights when it navigates a room for 1 minute without bumping.
Add dynamic speed: the closer it gets to a wall, the slower it moves, achieving buttery-smooth stops.
Use the StemSpace AI speech engine to have the robot say "Excuse me, coming through!" when obstacles appear.