Control hardware from any computer. One USB cable, pure Python. The Doer USB GPIO Board plugs into a Windows, macOS or Linux computer over USB-C and gives it 28 Raspberry Pi-style GPIO pins, with digital I/O, hardware PWM, analog input and I2C. You drive it from Python with the open-source DoerGPIO library, using RPi.GPIO-style calls.

Buy the board · DoerGPIO on PyPI · Docs on GitHub

Doer USB GPIO Board in its 3D-printed case with a color-coded pinout label, connected by USB

On this page: Features · Demo · Get started · Usage · Specs · Pinout · Firmware · Troubleshooting · FAQ · Build story · Resources

Features

It is built for makers who want to blink an LED, control a motor through a suitable external motor driver, or read a sensor straight from a laptop without setting up a Raspberry Pi; for rapid prototyping, where you script hardware tests on your development machine; and for teaching GPIO concepts with plain Python on any classroom computer. It can also add extra GPIO pins to a Raspberry Pi.

Demo

In the demo I connect an LED to the board and write a few lines of Python to make it blink.

The video also has its own page in Videos, or you can watch it on YouTube.

Get started

1. Install the Python library

DoerGPIO needs Python 3.9 or newer. It installs pyserial automatically.

pip install DoerGPIO

On some systems the command is pip3, or, if pip is not on your PATH, python -m pip install DoerGPIO.

2. Connect the board

Plug the board into a USB port with a data-capable USB-C cable. It shows up as a CH340 USB-serial device (USB ID 1a86:7523). Whether a driver is already available depends on your operating system and its version.

If your computer does not detect the board, see Troubleshooting.

3. Run your first script

This blinks an LED on GPIO 17 five times, then reads GPIO 22 with its pull-up resistor enabled:

from DoerGPIO import GPIO
import time
 
GPIO.setup(17, GPIO.OUT)            # GPIO 17 as output
for _ in range(5):
    GPIO.output(17, GPIO.HIGH)
    time.sleep(0.5)
    GPIO.output(17, GPIO.LOW)
    time.sleep(0.5)
 
GPIO.setup(22, GPIO.IN, pull_up_down=GPIO.PUD_UP)
print("GPIO 22:", GPIO.input(22))

When the library is imported it scans the USB ports, connects to the first Doer USB GPIO Board it finds and prints the board’s hardware and software version. There is no GPIO.setmode() call: the library always uses the GPIO numbers 0–27 from the pinout label.

Usage

Digital input and output

Any of the 28 pins can be an input or an output.

from DoerGPIO import GPIO
 
GPIO.setup(17, GPIO.OUT)                     # output, starts LOW
GPIO.setup(27, GPIO.OUT, initial=GPIO.HIGH)  # output, starts HIGH
GPIO.output(17, GPIO.HIGH)                   # GPIO.HIGH, 1 or True
 
GPIO.setup(22, GPIO.IN)                              # input, pull-up by default
GPIO.setup(23, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)  # input with pull-down
GPIO.setup(24, GPIO.IN, pull_up_down=GPIO.PUD_OFF)   # input, no pull resistor
print(GPIO.input(22))                                # 0 or 1

GPIO.setup() also accepts a list of pins, for example GPIO.setup([5, 6, 13], GPIO.OUT).

PWM

PWM works on GPIO 4, 9, 10, 16, 18, 20, 22 and 26.

from DoerGPIO import GPIO
import time
 
GPIO.setup(10, GPIO.PWM)
GPIO.pwm_set_frequency(10, 1000)   # set the frequency first (Hz)
for duty in range(0, 101, 10):     # duty cycle: whole-number percent, 0–100
    GPIO.pwm_set_duty(10, duty)
    time.sleep(0.2)
GPIO.pwm_set_duty(10, 0)

Things to know:

Analog input (ADC)

Analog input works on GPIO 0, 9, 10, 11, 14, 15, 18 and 26. Read it with GPIO.adc_read(), not GPIO.input():

from DoerGPIO import GPIO
 
GPIO.setup(26, GPIO.ADC)
value = GPIO.adc_read(26)   # 0–4095 (12-bit)
print("ADC on GPIO 26:", value)

The ADC reference voltage, and so the formula for converting a reading to volts, is still being confirmed.

I2C

The board has one hardware I2C controller that can be routed to either of two pin pairs. Only one route is active at a time.

BusSCLSDANote
1GPIO 16GPIO 20Shares pins with PWM on GPIO 16 and 20
2GPIO 3GPIO 2
from DoerGPIO import GPIO
 
if GPIO.i2c_init(1):                               # bus 1: SCL = GPIO 16, SDA = GPIO 20
    print([hex(a) for a in GPIO.i2c_scan(1)])      # addresses of devices found
 
# Read 2 bytes from register 0x00 of the device at address 0x48 (use your device's values)
data = GPIO.i2c_read_reg(1, 0x48, 0x00, 2)

I2C needs DoerGPIO 1.1 and firmware v0.2. Check the software version the library prints when it connects; see Firmware.

Cleaning up

In DoerGPIO 1.1, GPIO.cleanup() exists for RPi.GPIO compatibility but does not change any pin. Pins keep their last state after your script ends, so set outputs back to GPIO.LOW yourself if that matters for your circuit.

API reference (DoerGPIO 1.1)

Constants: GPIO.IN, GPIO.OUT, GPIO.PWM, GPIO.ADC, GPIO.HIGH, GPIO.LOW, GPIO.PUD_UP, GPIO.PUD_DOWN, GPIO.PUD_OFF.

Specs

The board is built around an STM32 microcontroller. Its firmware is written in C with STM32CubeIDE and is open source.

ItemValue
MicrocontrollerSTM32F070 (Arm Cortex-M0); exact variant (C6 or CB) to be confirmed
USB connectionUSB-C; USB-serial through a CH340 bridge (USB ID 1a86:7523)
DriversDriver availability depends on the OS and its version; to be confirmed
GPIO pins28 configurable pins, GPIO 0–27
Pull resistorsConfigurable pull-up / pull-down on all pins (inputs default to pull-up)
PWM pins8 pins: 4, 9, 10, 16, 18, 20, 22, 26
PWM duty cycleWhole-number percent, 0–100
PWM frequencyDefault 1 kHz; supported range to be confirmed (lower limit about 15 Hz: a source-derived estimate from firmware v0.2, not hardware-verified)
ADC pins8 pins: 0, 9, 10, 11, 14, 15, 18, 26
ADC resolution12-bit (0–4095)
I2C1 controller, two pin routes: GPIO 16/20 or GPIO 3/2
Serial link230400 baud
PlatformsWindows · macOS · Linux
Python3.9+; pip install DoerGPIO (library 1.1)
VersionsHardware 0.2; firmware v0.2
Firmware languageC (STM32CubeIDE)
LicenseGPL-3.0 (library: GPL-3.0-or-later)

Pinout

The GPIO numbers below are the ones printed on the pinout label and used in code. Every pin does digital input and output.

GPIOPWMADCNotesMCU pin
0✓PA1
1PB12
2I2C bus 2 SDAPB7
3I2C bus 2 SCLPB6
4✓PWM frequency shared with GPIO 22PA8
5PA12
6PA13
7PF1
8PB5
9✓✓PWM frequency shared with GPIO 18, 26PA6
10✓✓Own PWM timerPA7
11✓PA5
12PF0
13PA14
14✓PA2
15✓PA3
16✓Own PWM timer; I2C bus 1 SCLPB8
17PB15
18✓✓PWM frequency shared with GPIO 9, 26PB1
19PA15
20✓Own PWM timer; I2C bus 1 SDAPB9
21PB10
22✓PWM frequency shared with GPIO 4PA11
23PB2
24PB3
25PB4
26✓✓PWM frequency shared with GPIO 9, 18PB0
27PB14

The MCU pins come from the firmware v0.2 source. Where each GPIO, 5 V, 3.3 V and GND pin sits on the 40-pin header is shown on the board’s pinout label; a printable header diagram will be added here once it has been checked against the schematic.

Firmware

The board runs open-source firmware, DoerGPIO_FW, written in C with STM32CubeIDE. The current release is v0.2, which reports itself as DoerGPIO_HW0.2_SW0.2 and adds I2C support.

Firmware updates

Which boards this applies to

RequirementStatus
Hardware version 0.2 (reported as DoerGPIO_HW0.2_…)To be confirmed per batch
MCU variant: STM32F070, C6 or CBTo be confirmed
UART bootloader present and matching on all batches, including boards shipped before Feb 2026To be confirmed
Firmware image v0.2 (DoerGPIO_FW.bin, 37,360 bytes)Published; board compatibility to be confirmed
I2C: DoerGPIO 1.1 with firmware v0.2Confirmed from source

How updates work

The board has a small UART bootloader. For a short moment after power-up it listens for an update request. The upload_fw.py tool from the firmware repository waits for the board to be plugged in, sends that request, and uploads the new image in checked chunks; the board then restarts. The original Doer USB GPIO page described this flow. We will publish step-by-step instructions here once the requirements above are confirmed.

Check your version

The DoerGPIO library prints the board’s hardware and software version every time it connects. The port name depends on your system (for example COM3 on Windows or /dev/ttyUSB0 on Linux):

Doer GPIO board Found on port: /dev/ttyUSB0
Hardware Version: 0.2
Software Version: 0.2

Note both numbers when you contact support. A software version of 0.2 is needed for I2C.

Source and building

The firmware source, the bootloader and the upload tool are in the DoerGPIO_FW repository, with release notes on its releases page. The application builds in STM32CubeIDE and the bootloader with make; see the repository README for details.

Troubleshooting

“Doer GPIO board is not detected.” The library looks for a USB-serial device with the ID 1a86:7523. Check that:

When the board is not found, the library prints this message and waits for you to press Enter before it exits. Keep that in mind if you start scripts without a terminal.

Another CH340 device is plugged in. Many USB-serial adapters and Arduino-compatible boards use the same CH340 chip. The library connects to the first matching device it finds, so unplug the others while you use the board.

The port is busy. Close serial monitors and other programs that may have the port open, then run your script again.

Permission denied on Linux. Add your user to the dialout group, then log out and back in:

sudo usermod -a -G dialout $USER

Wrong Board Version, contact customer support at cs@doer.ee The library printed this because the board answered with an unexpected version string. Contact hi@doer.ee with the output you saw.

AttributeError for setmode or BCM. Code written for the original example used import DoerGPIO as GPIO and GPIO.setmode(GPIO.BCM). Change the import to from DoerGPIO import GPIO and delete the setmode line.

FAQ

Which operating systems are supported?

Windows, macOS and Linux. The board connects as a USB-serial device through a CH340 bridge. Whether a driver is already available depends on the operating system and its version; this is still to be confirmed. See Get started.

How do I install the Python library?

Run pip install DoerGPIO in your terminal. Python 3.9 or newer is required. The library finds the board over USB automatically, so there is no port to select.

Which pins support PWM and ADC?

PWM: GPIO 4, 9, 10, 16, 18, 20, 22, 26. ADC: GPIO 0, 9, 10, 11, 14, 15, 18, 26. All 28 pins support digital I/O with configurable pull-up and pull-down resistors. See the Pinout table.

Which pins are used for I2C?

Bus 1 uses GPIO 16 (SCL) and GPIO 20 (SDA); bus 2 uses GPIO 3 (SCL) and GPIO 2 (SDA). They are two routes for the same controller, so use one at a time. I2C needs firmware v0.2 and DoerGPIO 1.1.

What unit does the PWM duty cycle use?

A whole-number percentage from 0 to 100. Set the frequency first, because changing it resets the duty cycle to 0.

My code uses GPIO.setmode(GPIO.BCM). Do I need it?

No. DoerGPIO has no setmode(); it always uses the GPIO numbers from the pinout label. Import with from DoerGPIO import GPIO and remove the setmode line.

My board is not detected. What should I do?

See Troubleshooting.

Is the firmware open source?

Yes. Both the Python library and the STM32 firmware are released under the GPL-3.0 license: Python library and firmware on GitHub.

Where can I buy the board?

In the Doer shop: Doer USB GPIO Board.

Build story

The board started from an open-source concept: the RTK GPIO board by Ryanteck. I redesigned it from schematic to PCB, had the boards made and assembled, then designed a 3D-printed case with a color-coded pinout label.

1. Schematic. The redesigned circuit: the microcontroller, the USB connection and the 40-pin header.

Schematic of the Doer USB GPIO board

2. PCB layout. A two-layer board that keeps the Raspberry Pi-style header layout.

Two-layer PCB layout of the Doer USB GPIO board

3. Bare boards. A panel of boards back from fabrication.

Unpopulated PCB panel of Doer USB GPIO boards

4. Assembled board. The board with its parts populated.

Assembled Doer USB GPIO board with its USB-C connector

5. In its case. The finished board in its 3D-printed case, with the pinout label on top.

Finished Doer USB GPIO in a 3D-printed case with a color-coded pinout label

Every stage on one mat: an unpopulated panel, assembled boards, printed pinout labels and finished cases.

Every stage of the Doer USB GPIO on a cutting mat: unpopulated PCB panel, assembled boards, printed pinout labels and finished cases

Resources