TINKER PiEDESIGN IN INDIA

Build your first robot

Every robot does three things again and again: it senses the world, thinks (runs your program) and acts (moves or makes light and sound). A two-wheel robot car is the best first robot.

What you need

How a robot steers

Left motor / right motorThe robot…
forward / forwarddrives straight
forward / stopturns right
stop / forwardturns left
forward / backwardspins on the spot

Motors need more current than a microcontroller pin can give, so they always go through a motor driver, which works like a pair of electronic switches that can also reverse the motor.

Program 1: avoid obstacles

forever:
  if distance < 20 cm:
      stop, back up a little, turn
  else:
      drive forward

Program 2: follow a line

forever:
  if the left sensor sees black:  turn left
  if the right sensor sees black: turn right
  otherwise: drive forward

Test before you build

In TinkerPie Studio, the simulator shows motor and servo gauges, so you can test the program first. Then download it to the board. Look at the robot projects and the TinkerPie books for step-by-step builds.

Safety

More guides: Learn with TinkerPie.