Basic Wheeled Robot
Build your first OctoMY™-controlled robot
Basic Wheeled Robot
Build a simple two-wheeled robot controlled by OctoMY™. This tutorial walks through hardware assembly, wiring, and basic control.
Pro Tip
Don't have all the parts? Start with a robot kit! 2WD Smart Car Kits are inexpensive and include chassis, motors, wheels, and often a motor driver - everything you need except the Arduino and phone.
What you'll build
A differential-drive robot that:
- Responds to Remote control
- Uses an Android phone as the brain
- Can be extended with sensors and plans
┌───────────────────┐
│ Android Phone │
│ (Agent brain) │
└─────────┬─────────┘
│ USB
┌─────────┴─────────┐
│ Arduino + ArduMY │
└────┬─────────┬────┘
│ │
┌────┴───┐ ┌───┴────┐
│ Motor │ │ Motor │
│ Left │ │ Right │
└────────┘ └────────┘
Parts list
Required components
| Component | Quantity | Notes |
|---|---|---|
| Android phone | 1 | Android 8+ |
| Arduino Mega/Uno | 1 | Mega recommended |
| Motor driver (L298N) | 1 | Dual H-bridge |
| DC geared motors | 2 | 6V, with encoders optional |
| Wheels | 2 | Matched to motors |
| Caster wheel | 1 | For stability |
| USB OTG cable | 1 | Phone to Arduino |
| Battery pack | 1 | 6-12V for motors |
| Power bank | 1 | For phone (optional) |
| Chassis | 1 | Acrylic, 3D printed, or kit |
Tools
- Screwdriver set
- Soldering iron (optional)
- Wire strippers
- Hot glue gun
Did You Know?
The L298N motor driver can handle up to 2A per channel and 12V motors. For larger robots with more powerful motors, consider the BTS7960 driver which handles 43A!
Step 1: Prepare the chassis
Option A: Use a kit
Many robot chassis kits are available:
- 2WD Smart Car Kit
- Pololu Romi Chassis
- Any differential drive platform
Option B: 3D print
Print a simple base plate with motor mounts:
┌─────────────────────────────┐
│ ○ ○ │ ← Mounting holes
│ │
│ [Motor] [Motor] │ ← Motor mounts
│ ○ ○ │
│ │
│ [Caster] │ ← Rear caster
│ ○ │
└─────────────────────────────┘
Option C: Acrylic/wood
Cut a simple rectangular base (15x20 cm works well).
Step 2: Mount the motors
Attach motors
- Secure motors to chassis using brackets or screws
- Ensure wheels clear the chassis edge
- Motors should face outward on opposite sides
Add the caster
Mount the caster wheel at the rear center:
- Should touch ground with chassis level
- Allows robot to pivot smoothly
[Left Motor]═════════════════[Right Motor]
│ │
▼ ▼
(Wheel) [Chassis] (Wheel)
│
(Caster)
Step 3: Wire the motor driver
L298N connections
L298N Motor Driver
┌─────────────────────────────────────────────┐
│ │
│ [12V+] [GND] [5V] Motor power input │
│ │
│ [ENA] [IN1] [IN2] [IN3] [IN4] [ENB] │
│ │
│ [OUT1] [OUT2] [OUT3] [OUT4] │
│ └──Motor A──┘ └──Motor B──┘ │
└─────────────────────────────────────────────┘
Wiring diagram
| L298N Pin | Connect To |
|---|---|
| 12V+ | Battery positive |
| GND | Battery negative + Arduino GND |
| 5V | Arduino 5V (or leave as output) |
| ENA | Arduino D9 (PWM) |
| IN1 | Arduino D8 |
| IN2 | Arduino D7 |
| IN3 | Arduino D6 |
| IN4 | Arduino D5 |
| ENB | Arduino D10 (PWM) |
| OUT1/OUT2 | Left motor |
| OUT3/OUT4 | Right motor |
Security Consideration
Always use a separate power source for motors (not USB power). Motor noise can cause Arduino resets and unpredictable behavior. Keep motor power wires away from signal wires.
Step 4: Flash ArduMY firmware
Install ArduMY
-
Open Arduino IDE
-
Open the ArduMY sketch from OctoMY™ source:
src/libs/libardumy/arduino/ArduMYMain.ino -
Configure for your motors:
// Motor A (Left) #define MOTOR_A_EN 9 #define MOTOR_A_IN1 8 #define MOTOR_A_IN2 7 // Motor B (Right) #define MOTOR_B_EN 10 #define MOTOR_B_IN1 6 #define MOTOR_B_IN2 5 -
Upload to Arduino
Verify
Open Serial Monitor at 115200 baud. You should see:
ArduMY v1.0 ready
Actuators: 2
Waiting for commands...
Step 5: Install OctoMY™ Agent
On the Android phone
- Download OctoMY™ Agent from releases or build from source
- Install the APK
- Launch and create a new personality (e.g., "WheelBot")
Connect Arduino
- Connect Arduino to phone via USB OTG cable
- Grant USB permissions when prompted
- Agent should detect the controller automatically
┌─────────────────────────────────────────────┐
│ Controller Status │
├─────────────────────────────────────────────┤
│ │
│ Device: Arduino Mega │
│ Status: ● Connected │
│ Actuators: 2 (motors.left, motors.right) │
│ │
│ [Configure] [Test] │
│ │
└─────────────────────────────────────────────┘
Pro Tip
Not all USB OTG cables are created equal. If your phone doesn't detect the Arduino, try a different cable. Some cheap cables only support charging, not data.
Step 6: Configure actuators
Name the motors
- Go to Settings → Hardware → Actuators
- Configure each motor:
┌─────────────────────────────────────────────┐
│ Configure Actuator │
├─────────────────────────────────────────────┤
│ │
│ Name: motors.left │
│ Type: DC Motor │
│ Control: PWM + Direction │
│ │
│ PWM Pin: 9 │
│ Dir Pin 1: 8 │
│ Dir Pin 2: 7 │
│ │
│ [Test Motor] [Save] │
│ │
└─────────────────────────────────────────────┘
Test each motor
Use the Test Motor button to verify:
- Motor spins in expected direction
- Forward/reverse works correctly
- If reversed, swap IN1/IN2 pins in config
Step 7: Pair with Remote
On another device
- Install OctoMY™ Remote app
- Launch and create a personality
Pairing process
- On Remote: Tap [Pair New Agent]
- On Agent phone: Navigate to Pairing
- Scan the QR code or enter pairing key
- Complete the trust handshake
┌─────────────────────────────────────────────┐
│ Pairing Complete │
├─────────────────────────────────────────────┤
│ │
│ Thundering Walrus (Remote) │
│ paired with │
│ Gentle Badger (Agent) │
│ │
│ Trust Level: [████████░░] Handshake │
│ │
│ [View Agent] [Done] │
│ │
└─────────────────────────────────────────────┘
Step 8: Drive your robot!
Using Remote control
- On Remote, select your Agent
- Tap Control
- Use the virtual joystick or steering wheel
┌─────────────────────────────────────────────┐
│ Control: Gentle Badger │
├─────────────────────────────────────────────┤
│ │
│ ┌───────────────┐ │
│ │ ▲ │ │
│ │ ◄ ● ► │ Speed: 60% │
│ │ ▼ │ │
│ └───────────────┘ │
│ Joystick │
│ │
│ Mode: [Joystick ▼] [STOP] │
│ │
└─────────────────────────────────────────────┘
Control modes
| Mode | Description |
|---|---|
| Joystick | Arcade-style, push forward to move |
| Steering | Car-style, throttle + steering wheel |
| Tank | Direct control of each motor |
Testing and calibration
Verify driving straight
If the robot veers left or right:
- Go to Settings → Hardware → Calibration
- Adjust motor trim values
- Or calibrate wheel sizes if using encoders
Speed limits
For safety during testing:
- Set maximum speed to 50%
- Increase gradually as you gain confidence
- Always have a clear path for stopping
Troubleshooting
Robot doesn't move
| Issue | Solution |
|---|---|
| No power to motors | Check battery connections |
| Motors jitter but don't spin | Battery too weak, use higher voltage |
| Arduino not detected | Try different USB cable/port |
| Only one motor works | Check motor driver wiring |
Robot moves erratically
| Issue | Solution |
|---|---|
| Sudden direction changes | Check for loose connections |
| Intermittent stops | Battery running low |
| Opposite direction | Swap IN1/IN2 in configuration |
Connection issues
| Issue | Solution |
|---|---|
| Remote can't find Agent | Check both on same network |
| Pairing fails | Restart both apps, try again |
| High latency | Move closer, reduce interference |
Next steps
Now that your basic robot works:
- Add sensors - Sensor Setup
- Write a plan - Create a Plan
- Build more complex bots - Arduino Integration