GPS speedometer and clock
A bike or car speedometer that needs no wheel sensor: satellites do the measuring.
Shop by category
Shop all componentsRS485 is the two-wire bus used by most industrial sensors and meters. The Waveshare 2-channel isolated HAT adds two RS485 ports with isolation, so ground differences on long cables cannot reach the Pi. It shows up as /dev/ttySC0 and /dev/ttySC1 through an SC16IS752 chip. First connect channel A to channel B and send text between them; then the same port talks Modbus RTU with the minimalmodbus library.
Tick anything you already have and the total updates.
Follow the colours: red is power, dark grey is ground, blue is a signal.
The Pi kit's USB-C supply.
loopback.pyimport serial, time
a = serial.Serial("/dev/ttySC0", 9600, timeout=1)
b = serial.Serial("/dev/ttySC1", 9600, timeout=1)
for i in range(5):
a.write(f"hello {i}\n".encode())
print("CH1 got:", b.readline().decode().strip())
time.sleep(0.5)
modbus_read.pyimport minimalmodbus
dev = minimalmodbus.Instrument("/dev/ttySC0", 1) # slave address 1
dev.serial.baudrate = 9600 # check your sensor's manual
dev.serial.timeout = 1
value = dev.read_register(0, 1) # register 0, one decimal place
print("Register 0:", value)
The overlay line is wrong or SPI is disabled.
A and B are crossed; A goes to A, B to B.
Wrong address or baud rate, or the bus needs a 120 ohm terminator at the far end.
You can run two separate buses, or test one against the other as here.
Up to about 1,200 m at low baud rates with twisted pair.
It keeps ground loops and surges on the field wiring away from the Pi.
5 parts: Waveshare 2-Channel Isolated RS485 HAT, Raspberry Pi 4 Model B 2GB RAM Single Board Computer, Official Raspberry Pi 32GB A2 Class Micro SD Card, Solderless Breadboard and Dupont Jumper Wires (40 pcs). On this page you can tick the parts you already have and add only the rest to your cart.
No. This page has the complete, tested code (loopback.py and modbus_read.py).
About ₹9,294 for the parts at the prices on this page. Quantity price breaks lower the cost when you build several.
How differential RS485 works; Why isolation matters on long cables; Modbus RTU basics.
A bike or car speedometer that needs no wheel sensor: satellites do the measuring.
Records where you went every five seconds, ready to open on a map.
Two boards, two radios: press the button at the gate and it rings indoors.
Check temperature, humidity and pressure from any phone on your Wi-Fi.
Lessons are free to read. Maker (₹499/month) and Pro add quizzes, worked problems and certificates, paid with your Geekobot account. See plans
Learning project. Check every circuit and the datasheet of each part before you power it up.