Start your arduino robotics projects by deciding what the robot must do first: move, sense or be controlled. A two-motor chassis with a motor driver is the usual base, and an Uno should never power motors directly.
If the board itself is new to you, the arduino projects for beginners guide covers the first circuits. Come back here when you want to pick a robot direction and see which parts and decisions each one involves.
Deciding where to start
Three criteria settle most first-robot choices: how the robot moves, what it senses and how you command it. Work through them in that order, because each answer narrows the parts list, and the parts list decides which build to open next.
- Movement. A rolling robot needs DC motors and a driver. An Arduino cannot run a motor in both directions by itself; the circuit that does this is called an H-bridge. If the job is to hold something at a chosen angle, a servo is the simpler part.
- Sensing. Pick the sensor that matches the behaviour you want. A distance sensor gives a robot something to react to in open space, while other sensors suit environmental jobs such as light, motion or soil dampness.
- Control. Decide whether the robot runs on its own, answers a handheld remote or listens to a phone. Autonomous behaviour needs only a sensor and a sketch. Phone control adds a wireless module and a second set of decisions.
- Documentation. Choose projects that publish wiring and code together. Some vendor project pages list builds from beginner to advanced with circuit diagrams and source code included, which lets you check your own wiring against a working reference.
Matching a goal to a first build
- You want something that drives and reacts. Build the two-wheeled chassis in the next sections, then add a distance sensor. This path teaches the driver, the power supply and the sensor in one project.
- You want something that follows a path. Use the same chassis and driver, and read the arduino line follower robot guide for the sensing side.
- You want precise positioning rather than driving. Skip the wheeled chassis and begin with servos. The robotic arm section below shows a build that needs only an Uno and a handful of parts.
- You want to control something remotely. Get the chassis moving first, because wireless control only helps once the motors respond correctly to your wiring.
What every build shares
Every project here has the same three foundations: an Arduino board that runs the program, a way to wire parts without soldering, and software on a computer to load the code. Understanding these once saves repeated confusion in later builds.
The Arduino board is the brain of the robot, because it runs the software that reads sensors and decides what the motors do. An Arduino Uno is the board used in the builds below. It is a good choice for a first robot because most published projects, including the primary-source arm project later in this guide, target it directly.
A solderless breadboard holds the prototype wiring. The Arduino project hub’s robotic arm build uses a 400-pin breadboard, which gives you an idea of the size that suits a small servo project. For code, the same project has you copy a sketch into the Arduino IDE and upload it to the Uno. That edit, upload and test loop is the working method for every other build on this page.
Prototype on the breadboard first and move to a permanent layout only when the behaviour is right. Mistakes in a wiring diagram are far cheaper to fix with a jumper wire than with a soldering iron, and the next section shows where the wires go.
Building a simple two-wheeled robot from scratch
A simple Arduino robot is an Uno, a motor driver, two DC motors on a chassis, and a separate power supply for the motors. Robot cars have no steering. They turn by spinning the two wheels at different speeds, and driving them in opposite directions spins the car on the spot. That one fact shapes the whole sketch: forward, reverse, left and right are all just combinations of motor direction and speed.
Wiring order
- Mount the motors on the chassis. Fix both motors and wheels first so you can test movement as soon as the electronics are connected.
- Connect each motor to a driver channel. One driver can drive a motor on each of its two channels, which is why a two-wheeled robot needs only one board.
- Power the driver from its own supply. An Arduino pin can supply at most 20-40 mA, and the guidance is plain: never power motors from the Arduino’s 5V pin. Small toy motors draw hundreds of milliamps while running and more than 1 A when starting or stalled, so the battery pack must connect to the driver, not to the board.
- Join the grounds. The driver’s control inputs only work reliably when the board and the motor supply share a common reference, so run a ground wire between them.
- Run control wires from the Uno to the driver. Direction pins and speed pins each get a jumper wire, and the pin choices go into your sketch as named constants so you can change them in one place.

Uploading and testing
Connect the Uno to your computer with its USB cable, open the Arduino IDE, select the board and port, and upload. Test with the wheels lifted off the table, one motor at a time. If a wheel turns the wrong way, swap that motor’s two wires at the driver rather than editing the sketch.

Once both wheels respond, write small movement functions for forward, reverse, left, right and stop, and call them from the main loop. Keeping movement in named functions means every later addition, whether a sensor or a wireless command, only has to choose which function to call.

Choosing a motor driver
For a two-wheeled robot, the L298N is the common choice because it drives two DC motors independently, but small motors with a modest supply may be better served by a more efficient driver. The decision rests on three numbers: the current each channel can carry, the voltage range, and how much voltage the chip wastes.
The arduino l298n motor driver guide covers wiring and speed control in detail. For choosing, the table below compares it with a smaller alternative.
| Driver | Motor supply | Current | Traits | Planning use |
|---|---|---|---|---|
| L298N | 5-35 V (max 12 V with the 5V jumper fitted) | 2 A continuous, 3 A peak per channel | Drives 2 DC motors or 1 bipolar stepper; 5 V logic with inputs that also recognise a 3.3 V signal; about 1.5-3 V lost across the chip | Suits larger or higher-voltage motors; budget for a supply that is higher than the motor’s rated voltage |
| TB6612FNG | Max 13.5 V | 1.2 A continuous | Small, efficient (MOSFET), 3.3 V compatible | Suits small motors and 3.3 V boards where the lost voltage matters |
Figures are from the L298N motor control tutorial.
How to read the numbers
- Current is the first filter. The L298N’s 2 A continuous rating per channel leaves comfortable headroom over a small toy motor, which draws more than 1 A only while starting or stalled. The TB6612FNG’s 1.2 A continuous rating leaves less headroom for those spikes, so it fits motors that stay well below that figure.
- Voltage loss is the hidden cost. The L298N loses about 1.5-3 V across the chip, and the motor sees that much less. On a low battery voltage this noticeably reduces wheel speed, so a small pack feeding a low-voltage motor is a case for the more efficient driver.
- The 12 V ceiling is a limit, not a target. With the 5V jumper fitted the L298N supports a maximum of 12 V, which is a boundary for the motor supply, not a recommended supply voltage.
- Logic level matters with wireless boards. The L298N inputs treat anything above about 2.3 V as HIGH, so a 3.3 V signal from a wireless board drives them directly.
For most first robots, choose the L298N when you want a widely documented board with plenty of current margin, and choose the smaller driver when the motors are small and the supply is limited. Whichever you pick, the wiring pattern in the previous section stays the same.
Servo motors and continuous rotation
A standard hobby servo does not spin freely. It moves to an angle that your sketch commands and holds it there. A common pattern is to read a potentiometer, which gives an analog value from 0 to 1023, and map it to an angle from 0 to 179 degrees. The Arduino project hub’s robotic arm project does exactly this in its sketch with the map function.

That angle-limited behaviour answers the question about turning a servo continuously in both directions. A positional servo will not do it from a mapped angle alone. You need a servo built or modified for continuous rotation, where the command sets direction and speed instead of position. If you only want a wheel that turns forward and backward, a plain DC motor behind an H-bridge driver is simpler and sturdier than modifying a servo.
The decision therefore comes down to the job. Pick a positional servo for joints, grippers and pointers. Pick a continuous-rotation servo for a compact drive wheel on a very small robot. Pick a DC motor and driver for anything that needs real pulling power. The how to control a servo motor with arduino guide takes the sweep, position and speed steps further.
Measuring distance with an HC-SR04
To measure distance with an HC-SR04 on an Arduino, you trigger the sensor, wait for the echo and convert the elapsed time to a distance. The sensor sends out ultrasonic pulses, and depending on how long the signal takes to bounce back, the approximate distance to an obstacle can be calculated.

In a sketch this takes three steps. Pulse the trigger pin, time how long the echo pin stays high, then turn that time into a distance with the speed-of-sound constant. Because the result is an approximation, compare a few readings against a tape measure before trusting a threshold in your robot’s logic.
Using the reading to steer
The reading only matters once it changes what the motors do. A simple pattern is to drive forward while the distance is comfortable, stop when it falls below a threshold you choose, then spin the wheels in opposite directions until the reading clears. The arduino obstacle avoiding robot guide builds this complete loop on the two-wheeled chassis.
Mount the sensor facing forward on the chassis and keep its wires clear of the wheels. Raise the threshold if the robot keeps clipping obstacles, since a heavier or faster chassis needs more room to stop. Choose this sensor when you want a robot to react to what is ahead, and look at line-sensing instead when the path is drawn on the floor.
Controlling a robot from a smartphone
The easiest way to control an Arduino robot from a smartphone is Bluetooth serial. The easiest route is described as the Bluetooth serial interface, where the phone sends text commands that your sketch reads and maps to movement functions. If you specifically want WiFi, an ESP8266 module is the usual route, and the approach changes in a few practical ways.

Bluetooth or WiFi
- Bluetooth serial suits a first attempt. It behaves like a text connection between the phone and the board, so you can test commands before the motors are even connected.
- WiFi suits longer range and richer interfaces. An ESP8266 can host or join a network, so a phone can send commands from a web page or an app. The trade-off is more setup, because the board has its own network and programming steps.
Connecting a wireless board to the driver
Check the logic level before wiring a wireless board to the motor driver. The L298N inputs treat anything above about 2.3 V as HIGH, which means 3.3 V signals from a board such as an ESP32 work directly. Compare your wireless module’s output against that threshold, and keep the motor supply separate from the module’s own supply.
If you want to drive the robot with no phone at all, the arduino ir remote control guide shows a simpler handheld option that needs no network setup. A phone app with on-screen buttons is more flexible, but a basic remote is quicker to get working on a first build.
A robotic arm built on servos
A small robotic arm is the clearest example of servo control used for a whole project. The Arduino project hub describes a build that grabs objects with just 3 servos and one Arduino UNO, and its parts list names three SG90 micro-servo motors alongside the 400-pin breadboard.
The project reads potentiometers and maps each reading to a servo angle, so turning a knob moves the matching joint. That makes it a good second project after a driving robot, since you reuse the idea of mapping an input to an output but work with positions rather than speeds. The arduino robotic arm guide covers the build and the sketch in more detail.
Choose the arm if you prefer precise, repeatable movement over a robot that wanders. Choose the wheeled chassis if you want something that explores a room. Both teach the same code habits, but the arm avoids motor-driver power concerns because small servos are controlled differently from DC motors.
Add-ons and next sensors
Once a chassis or arm works, add-ons extend what it can sense or switch. Each of these has its own wiring guide, so use this list to pick the next step rather than to learn the details.
- Precise motor positioning. The arduino stepper motor control guide suits builds that need stepwise movement rather than free-spinning wheels.
- Counting rotation. An arduino rotary encoder gives your sketch feedback about how far a shaft has turned, whether as a knob or as wheel feedback.
- Detecting people or movement. The arduino pir motion sensor guide covers a sensor that triggers when something moves in its field of view.
- Reading light levels. If you want a robot that reacts to brightness, see how to connect photoresistor to arduino.
- Switching bigger loads. The arduino relay wiring guide covers switching devices that a motor driver is not suited for.
- Pointing and marking. The arduino laser module guide shows a common add-on part for aiming and alignment.
- Watering plants. An arduino soil moisture sensor project turns the same sketch habits towards a garden task rather than a moving robot.
Pick one add-on at a time. A robot that gains two new parts in one session is hard to debug, because you cannot tell whether a fault is in the new wiring or the new code.
Arduino or Raspberry Pi for robotics
An Arduino runs your robot’s software directly on a simple board, which suits motor control and sensor reading. A Raspberry Pi is a different kind of computer, and the right choice depends on what the robot has to do beyond driving and sensing. The arduino vs raspberry pi for robotics comparison weighs the two against typical projects.
For the builds on this page, the Uno is enough: it reads the distance sensor, commands the driver and talks to a wireless module. Consider a different board only when a project clearly outgrows those jobs.
Frequently asked questions
Can the L298N run a stepper motor as well as DC motors?
Yes. According to the L298N tutorial, it can drive either two DC motors or one bipolar stepper motor, not both at once.
Does using the Servo library affect motor-driver wiring on an Uno?
It can. On an Uno the Servo library disables PWM on pins 9 and 10, so the same tutorial advises moving the driver’s ENA and ENB speed pins to pins 5 and 6 if you mix servos and an L298N.
How much does a complete beginner robot cost?
One beginner build with recommended parts comes to around $115. Your total depends on which chassis, motors and battery pack you choose.
Is phone control harder on some phones?
Yes. Bluetooth serial is the easy route, but for a Windows phone you would need to find a Bluetooth remote control for that platform and implement a driver yourself.



