Line follower robot with L298N and TCRT5000
The classic robotics starter: a two-wheeled car that tracks a black line on its own.
Shop by category
Shop all componentsHiwonder's LX-16A is a serial bus servo: instead of a PWM signal, each servo has an ID and listens for commands on a shared half-duplex serial line, and can report its position, voltage and temperature. The bus servo tester board connects that line to a computer over USB. This project builds the command packets by hand in Python so you understand the protocol, and moves two servos in turn.
Keep fingers clear of servo horns; they are strong.
Tick anything you already have and the total updates.
Hiwonder bus servo controller tester
Follow the colours: red is power, dark grey is ground, blue is a signal.
2S LiPo (6-8.4 V) into the tester; USB only carries data.
lx16a.pyimport serial, time
PORT = "/dev/ttyUSB0" # COM5 on Windows
MOVE_TIME_WRITE = 1
def packet(servo_id, cmd, params):
length = len(params) + 3
body = [servo_id, length, cmd] + params
checksum = (~sum(body)) & 0xFF
return bytes([0x55, 0x55] + body + [checksum])
def move(s, servo_id, pos, ms):
pos = max(0, min(1000, pos)) # 0-1000 = 0-240 degrees
s.write(packet(servo_id, MOVE_TIME_WRITE, [pos & 0xFF, pos >> 8, ms & 0xFF, ms >> 8]))
with serial.Serial(PORT, 115200, timeout=0.1) as s:
for _ in range(3):
for sid in (1, 2):
move(s, sid, 200, 600); time.sleep(0.7)
move(s, sid, 800, 600); time.sleep(0.7)
move(s, 1, 500, 500); move(s, 2, 500, 500); time.sleep(1)
They share an ID; set different IDs one at a time.
The servos need their own power; USB alone is not enough.
Close Hiwonder's PC software before running the script.
One cable for many servos, plus position and temperature feedback.
Yes, through a half-duplex serial circuit or Hiwonder's controller.
0 to 240 degrees in position mode, or continuous in motor mode.
3 parts: 2 × Hiwonder Serial Bus Servo (LX-15D and LX-16A), Hiwonder Serial Bus Servo Controller Communication Tester and Bonka 2S 7.4V LiPo Battery Pack (1000 to 4200mAh, XT60). On this page you can tick the parts you already have and add only the rest to your cart.
It is a intermediate project and takes about 1-2 hours. The build on this page has 6 steps.
No. This page has the complete, tested code (lx16a.py).
About ₹10,292 for the parts at the prices on this page. Quantity price breaks lower the cost when you build several.
How bus servos differ from PWM servos; Building a packet with a checksum; Daisy-chaining servos.
Keep fingers clear of servo horns; they are strong.
The classic robotics starter: a two-wheeled car that tracks a black line on its own.
A robot that looks left and right with its ultrasonic "head" and picks the clearest way.
Roams a tabletop without ever driving off the edge.
Drive a 4WD car from your Android phone over Bluetooth.
Learning project. Check every circuit and the datasheet of each part before you power it up.