Back to rankings

hishizuka/pizero_bikecomputer

Pythonqiita.com/hishi/items/46619b271daaa9ad41b3

An open-source bike computer with GPS and ANT+ capabilities, based on the Raspberry Pi Zero (W, WH, 2 W) or the Compute Module Zero. It also includes offline maps and navigation.

raspberry-pipower-metercyclingpythongpsfittcxsensorantpluspyqt5bikebicycle
Star Growth
Stars
1.2k
Forks
99
Weekly Growth
Issues
0
5001k
Jan 2023Mar 2024May 2025Jul 2026
ArtifactsPyPIpip install pizero_bikecomputer
README

title

Pi Zero Bikecomputer

An open-source bike computer with GPS and ANT+ capabilities, based on the Raspberry Pi Zero (W, WH, 2 W) or the Compute Module Zero.

https://github.com/hishizuka/pizero_bikecomputer

News

  • 2026/5/9 Official hardware is being designed and prototyped for Pi Zero Bikecomputer. The official hardware design files will be released under CERN-OHL-S-2.0.
    • Official hardware prototype
  • 2026/1/30 Support for a groundbreaking dual-screen display is in progress.
    • dual screen back
  • 2026/1/30 The MIP LCD methods will be fully deprecated, and a switch to a newly released DRM driver is planned.
  • 2025/10/12 Supports Raspberry Pi OS Trixie. For new installations, it is highly recommended to install Trixie due to compatibility with asyncio and asynqt. The following will no longer be supported going forward:
    • Raspberry Pi OS Bookworm and earlier
    • PyQt5
  • 2025/6/24 Now major packages can now be installed with a 1-line command.
    • /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/hishizuka/pizero_bikecomputer/refs/heads/master/install.sh)"

Stargazers over time

Stargazers over time

Table of Contents

Abstract

Pi Zero Bikecomputer is a GPS and ANT+ bike computer based on Raspberry Pi Zero (W, WH, 2 W). This is the first DIY project in the world integrating the necessary hardware and software for a modern bike computer. It measures and records position (GPS), ANT+ sensors (speed / cadence / power), and I2C sensors (pressure / temperature / accelerometer, etc.). It also displays these values, maps, and courses in real time. In addition, it writes logs to .fit format files.

In this project, Pi Zero Bikecomputer has already got the basic functions needed for a bike computer. The next target is to add new functions that existing products do not have!

You will enjoy both cycling and the maker movement with Pi Zero Bikecomputer!

Here are detailed articles in Japanese. The original Japanese titles are kept below, with English translations for reference.

Daily updates are posted on X (@pi0bikecomputer), and my riding activities are on STRAVA.

system-01-202106system-02

hardware_top

Features

  • Easy to make

    • Use modules available at famous Maker stores.
    • Assemble in Raspberry Pi ecosystems.
    • Install with basic commands such as apt-get install, pip and git command.
  • Customization

    • Need only modules you want to use. Pi Zero Bikecomputer detects your modules.
  • Easy to develop

    • Pi Zero Bikecomputer uses same libraries as for standard Linux.
    • So, you can run in cross-platform environments such as Raspberry Pi OS, Linux, macOS and Windows.
  • Good balance between battery life and performance

Specs

Some functions depend on your parts.

Summary

Specs Support Detail
Logging Yes See below.
Sensors Yes ANT+ sensors and I2C sensors. See below.
Maps and navigations Yes A GPS module or the Android app GadgetBridge is required. See below.
Displays, controls and power Yes Multiple displays, hardware buttons, remote controls, and battery modules are supported. See below.
GUI Yes PyQt is the primary GUI. QML, Kivy, and headless modes are also available.
Wifi & Bluetooth Yes Using built-in modules.
Smartphone connections Yes Android only. GadgetBridge integration and route sharing from Google Maps via Bluetooth.
Battery life(Reference) 18h with 3100mAh mobile battery(Garmin Charge Power Pack) and MIP Reflective color LCD.

Logging

Specs Support Detail
Stopwatch Yes Timer, Lap, Lap timer
Average value Yes [Total, Lap ave, Pre lap ave] x [HR, Speed, Cadence, Power], [3s, 30s, 60s] x [HR, Power]
Cumulative value Yes [Total, Lap, Pre lap] x [Distance, Works, Ascent, Descent]
Gross Yes Elapsed time, gross average speed(=distance/elapsed time), gained time from average speed 15km/h(for brevet)
Auto stop Yes Automatic stop at speeds below 4km/h(configurable), or in the state of the acceleration sensor when calculating the speed by GPS alone
Recording insterval 1s Smart recording is not supported.
Resume Yes Recording continues even if the power is suddenly turned off and restored.
Output .fit log file Yes The standard format used by famous services as Strava and Garmin Connect. Also .csv format output is supported.
Upload Yes Strava, Garmin and Ride with GPS.
Live Track Yes Track data is uploaded in real time to ThingsBoard.io dashboard service, so you can share your activity with friends and family.

Dashboard(ThingsBoard) example

thingsboard-01 thingsboard-02

Sensors

USB dongle is required if using ANT+ sensors.

Specs Support Detail
ANT+ Heartrate sensor Yes
ANT+ Speed sensor Yes
ANT+ Cadence sensor Yes
ANT+ Speed&Cadence sensor Yes
ANT+ Powermeter Yes Calibration is not supported.
ANT+ Light Yes Bontrager Flare RT only.
ANT+ Control Yes Garmin Edge Remote only.
ANT+ Environment Yes Garmin tempe (temperature sensor)
BLE peripherals Partial Zwift Click V2 remote and Fake Trainer for Zwift are supported.
Barometric altimeter Yes I2C sensor(pressure, temperature)
Accelerometer Yes I2C sensor
Gyroscope Yes I2C sensor
Magnetometer Yes I2C sensor
Light sensor Yes I2C sensor. Use for auto backlight and lighting.

Maps and navigations

Specs Support Detail
GPS module Yes UART GPS module(via GPSd) and I2C GPS are supported.
Positioning from smartphones Yes Using the Android app GadgetBridge.
Map Yes Support raster map tile format like OSM (z/x/y.png or jpg). So, offline map is available with local caches. Also, raster .mbtile format is supported.
Course on the map Yes Local .tcx files, cloud courses from Ride with GPS, and routes shared from Google Maps on Android via Bluetooth.
Search route Yes Google Routes API (Compute Routes)
Course profile Yes
Detect climbs Yes Like Garmin ClimbPro. Only climbs on the course, not detect nearby climbs.
Cuesheet Yes Use course points included in course files(.tcx).
Map overlay Yes Heatmap (Strava / Ride with GPS), weather (rain / wind), and configurable wind / DEM data sources.
DEM / wind data sources Yes External DEM tiles and wind data sources can be selected from the menu and settings.

Displays, controls and power

Specs Support Detail
MIP reflective color LCD Yes JDI 2.7 / 4.4 inch and Azumo 3.4 inch modules are supported.
SHARP memory display Yes 2.7 / 4.4 inch monochrome MIP modules are supported.
TFT LCD Yes Pirate Audio, Display HAT Mini, generic ST7789 breakout, and PiTFT are supported.
E-paper Yes Papirus and DFRobot RPi Display are supported.
Touchscreen Partial Available on supported TFT displays.
Hardware buttons Yes Button SHIM, MCP23008 / MCP23009-based IO expanders, and display-attached buttons are supported.
Remote control Yes Garmin Edge Remote (ANT+) and Zwift Click V2 (BLE) are supported.
Battery modules Partial PiJuice HAT / Zero and PiSugar3 are supported.

Map example

Map and Course Profile with detecting climbs.

map-01 map-02

Heatmap overlay

Strava heatmap.

map_overlay-strava

Weather map overlay

RainViewer and openportguide are available worldwide.

map_overlay_rainviewer map_overlay_weather openportguide de

In Japan, 気象庁降水ナウキャスト(rain) and SCW(wind) are available.

GUI

Specs Detail Note
Basic page(values only) Yes
Graph Yes Altitude and performance(HR, PWR, W prime balance)
Customize data pages Yes With layout.yaml
ANT+ pairing Yes
Select course Yes local .tcx, Ride with GPS, and Android Google Maps via Bluetooth.
Upload activity Yes Strava, Garmin and Ride with GPS.
Select map Yes base maps, overlays, and external data sources
Adjust parameter Yes wheel size, altitude, CP and W prime balance
Network setting Yes Toggle Wi-Fi / Bluetooth, BT pairing / tethering, and GadgetBridge-related options.
Language localization Yes Font and translation file of items are required.
No GUI option Yes headless mode

Performance graph

performance_graph-01

Language localization(Japanese)

language-ja

Experimental functions

ANT+ multiscan

it displays three of the people around you in the order in which you caught sensors using ANT+ continuous scanning mode.

Comparison with other bike computers

  • 314km ride with GARMIN Edge Explore 2 and Pizero Bikecomputer (strava activity)

  • 2023_TOJ_compare

Items Edge830 Pi Zero Bikecomputer
Distance 313.7 km 314.3 km
Work 3,889 kJ 3,926 kJ
Moving time 12:03 12:04
Total Ascent 2,271 m 1,958 m

Hardware Installation

See hardware_installation.md for supported displays, GPS modules, I2C sensors, buttons, batteries, and assembly examples.

Software Installation

See software_installation.md.

For a new Raspberry Pi OS Trixie setup, the recommended entry point is:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/hishizuka/pizero_bikecomputer/refs/heads/master/install.sh)"

For macOS or Linux development, see the manual setup steps in software_installation.md.

Official Hardware (under development)

Official Pi Zero Bikecomputer hardware is being designed and prototyped for Raspberry Pi Zero-family configurations.

The official hardware design files will be published by this project under the CERN Open Hardware Licence Version 2 - Strongly Reciprocal (CERN-OHL-S-2.0), unless otherwise stated.

Third-party boards are independent projects and are not official, endorsed, or supported by Pi Zero Bikecomputer unless they are explicitly listed in this repository.

  • 4inch-01
  • 4inch-02
  • 4inch-03

Q&A

License

The software in this repository is available under the GNU General Public License v3.0.

Official hardware design files, when published by this project, are available under the CERN Open Hardware Licence Version 2 - Strongly Reciprocal (CERN-OHL-S-2.0), unless otherwise stated.

The code shown below is ported and modified from Azumo's code under the Apache License 2.0 (third_party/apache/LICENSE.Apache2). See the NOTICE file for details.

  • modules/display/mip_display_base.py
  • modules/display/cython/mip_display.cpp

This project also includes code ported and modified from the Apache NuttX RTOS project under the Apache License 2.0 (third_party/apache/LICENSE.Apache2). See the NOTICE file for details.

  • modules/sensor/gps/cython/cxd5610_rpi.c
  • modules/sensor/gps/cython/cxd5610_rpi.h

This project also includes code adapted from swiftcontrol under the GNU General Public License v3.0. See the NOTICE file for details.

  • modules/sensor/ble/zwift_click_v2.py

This project also includes code ported and modified from Bosch Sensortec GmbH's code under the BSD 3-Clause License. See the NOTICE file for details.

  • Source APIs:
  • Adapted files:
    • modules/sensor/i2c/cython/bhi3_shuttle_board_3/common.c
    • modules/sensor/i2c/cython/bhi3_shuttle_board_3/common.h

This project also includes code vendored from hishizuka/crdp, which is based on the original biran0079/crdp project by Ran Bi, under the MIT License. See the NOTICE file for details.

Author

hishizuka (@pi0bikecomputer on X, pizero bikecomputer on STRAVA)

Link

Maker Faire Tokyo 2020 - Raspberry Pi Zero Cyclecomputer

HACKADAY - DEVELOPING AN OPEN SOURCE BIKE COMPUTER

Related repositories
home-assistant/core

:house_with_garden: Open source home automation that puts local control and privacy first.

PythonPyPIApache License 2.0pythonhome-automation
home-assistant.io
89.4k38.1k
pi-hole/pi-hole

A black hole for Internet advertisements

ShellOtherpi-holead-blocker
pi-hole.net
60k3.3k
gogs/gogs

The painless way to host your own Git service

GoGo ModulesMIT Licensegogsgo
gogs.io
47.7k5.1k
raysan5/raylib

A simple and easy-to-use library to enjoy videogames programming

Czlib Licenseraylibc
raylib.com
34k3.2k
hwdsl2/setup-ipsec-vpn

Set up your own IPsec VPN server in just a few minutes, with IPsec/L2TP, Cisco IPsec and IKEv2. Supports Ubuntu, Debian, CentOS/RHEL, Alpine Linux and Raspberry Pi OS. Includes client config and management scripts.

ShellOthervpnipsec
28.2k6.5k
MagicMirrorOrg/MagicMirror

MagicMirror² is an open source modular smart mirror platform. With a growing list of installable modules, the MagicMirror² allows you to convert your hallway or bathroom mirror into your personal assistant.

JavaScriptnpmMIT Licensemagicmirrorjavascript
magicmirror.builders
23.7k4.5k
navidrome/navidrome

🎧 Your Personal Streaming Service

GoGo ModulesGNU General Public License v3.0musicsubsonic-server
navidrome.org
22.4k1.6k
mikeroyal/Self-Hosting-Guide

Self-Hosting Guide. Learn all about locally hosting (on premises & private web servers) and managing software applications by yourself or your organization. Including Cloud, LLMs, WireGuard, Automation, Home Assistant, and Networking.

Dockerfileself-hostedselfhosted
22k1.1k
jarun/nnn

n³ The unorthodox terminal file manager

CBSD 2-Clause "Simplified" Licensefile-managerdisk-usage
21.7k811
microsoft/IoT-For-Beginners

12 Weeks, 24 Lessons, IoT for All!

Jupyter NotebookMIT Licenseiotmicrocontroller
17k2.9k
thibmaek/awesome-raspberry-pi

📝 A curated list of awesome Raspberry Pi tools, projects, images and resources

ShellOtherawesomeraspberry-pi
16.6k1.1k
alphacep/vosk-api

Offline speech recognition API for Android, iOS, Raspberry Pi and servers with Python, Java, C# and Node

Jupyter NotebookApache License 2.0speech-recognitionasr
15k1.7k