Skip to the content
4 layers150 × 100 mmRun3, the printed circuit board in 3D

rp2040-plus and 1.3 inch LCD screen for pi pico by waveshare

Size
150 × 100 mm
Copper layers
4
Thickness
1.6 mm
Parts
150
Nets
114
Pads
559
Tracks, vias
1,318, 251
Pours
2
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
4 Oct 2026
Updated
29 Oct 2026

Overview

Run3 is an open-source printed circuit board by John-ODell, from the John-ODell/pocket-chance repository on GitHub. It is a 4-layer board of 150 × 100 mm with 150 parts on 114 nets, routed with 1,318 tracks and 251 vias.

It is built around the RP2350A, PAM8302AADCR and APS6404L-3SQR-SN, with the BQ24074RGTR, DS3231MZ+ and DW01A among its other parts. Its parts include 43 capacitors, 43 resistors, 10 ICs, 10 switches and 8 connectors. It belongs with the lEDs and displays and keyboards and input boards and the RP2040 and RP2350 boards of this library.

Main components

12

README

README.md

Pocket Chance (J'Boy) - John O'Dell

A pocket casino for the Waveshare RP2040-Plus and the Waveshare 1.3" LCD HAT, written in MicroPython. It runs offline on the board. Three games: Blackjack, Ultimate Texas Hold'em and John's own Caribbean, a flop game with a low or high call.

The HAT plugs onto the board, so there is no wiring in this project. The pin map and everything we measured on a real board is in docs/HARDWARE.md.

This project was built with a small team of AI sessions (a PM, a developer and a hardware expert) directing one person. How that works, with role files and starter prompts you can reuse, is in docs/AI_TEAM.md.

Last updated: 2026-10-04

Items needed

  • Waveshare RP2040-Plus (16 MB version)
  • Waveshare Pico LCD 1.3" HAT (240 x 240 screen, joystick, 4 buttons)
  • USB-C data cable
  • A computer with Python 3.9 or newer

Quick start

The full follow-along guide is SETUP.md. The short version:

  1. Download the 16 MB MicroPython firmware for the RP2040-Plus from micropython.org. Hold BOOTSEL, plug in, drag the .uf2 onto the RPI-RP2 drive.
  2. pip install mpremote pillow
  3. Copy the files to the board with mpremote fs cp (exact commands in SETUP.md, Step 4).
  4. mpremote run pocket.py

You should see the menu: "Pocket Chance", your chips, and the games.

If the screen stays dark, open pocket.py and set FAST_SPI = False. That is the only board-specific setting (see docs/HARDWARE.md, "The one trap").

Controls

Landscape, with USB-C and the joystick on the left and the buttons on the right.

WhereControlDoes
MenuJoystick up / downMove the box (the list scrolls)
MenuAPick a game. "Off" stops the program
Blackjack, bettingJoystick up / downChange the bet (5 to 500, steps of 5)
Blackjack, bettingA deal, B back to menu
Blackjack, playingA hit, B stand, X double, Y split a pair
Ultimate, bettingJoystick, A deal, X help, B menuBlind equals the Ante
Ultimate, pre-flop / flop / riverA raise (4x / 2x / 1x), Y raise 3x pre-flop, B check (fold at the river)The table cards turn as you go; the river prompt shows the dealer outs
Caribbean, bettingJoystick up / down, left / rightChange the Ante (5 to 50, capped at a fifth of your chips)
Caribbean, bettingA deal, X help, B menu
Caribbean, flopA call high (4x the Ante), Y call low (2x), B foldThe last two table cards turn, then the dealer's cards one by one

Games

GameStatusRulesHouse edge
BlackjackPlayable6 decks, reshuffle at 75% dealt, dealer stands on all 17, blackjack pays 3:2, hit / stand / double, split pairs once (aces get one card each, double after split allowed)about 0.55%
Ultimate Texas Hold'em ("Ultimate")PlayableEqual Ante and Blind (5 to 50), two hole cards, five table cards; raise 4x or 3x pre-flop, 2x after the flop, 1x at the river or fold; dealer needs a pair for the Ante to count; Blind pays straight 1:1 up to royal 500:1. X teaches the full published simple strategy and the river prompt shows the dealer-outs count (UTH_HINT). Four other players sit at the sides as chip stacks (UTH_SEATS)about 2.4% of the ante with the taught strategy, 2.2% optimal
Caribbean (John's flop game)PlayableAnte 5 to 50, two cards each, the first three table cards turn, then call high (4x) or low (2x) or fold, the last two turn; best five of seven; the dealer needs a pair of fours or better, otherwise every bet pushes; a winning Ante pays by a table (flush 2:1, full house 3:1, quads 10:1, straight flush 20:1, royal 100:1, else 1:1), the call 1:1. When you and all four seats beat a dealer hand, a win on the next hand pays three times (Ante and call together). Four chip-stack seats (CAR_SEATS). The published game this is based on is Casino Hold'em (one call size, 2.16% optimal)about 5% of the ante with the taught strategy (15% without the multiplier)
Caribbean StudArchived (John's ruling, 2026-10-06)Was on the board as "Caribbean" until step 1n; code in archive/stud/5.2%
SlotsShelvedA 3-reel machine was built and tuned (93.84% return) then dropped: a classic multi-line machine does not fit the board's RAM. Code kept in archive/slots/n/a

Chips: you start with 1000. If you go broke you get a free refill. Your chips are saved to the board after every round, with a backup copy and recovery if the save is damaged.

The house edges were measured by simulation (tools/bj_edge.py, tools/bj_split.py, tools/uth_edge.py, tools/casino_holdem_edge.py; archive/stud/stud_edge.py for the archived game) and the rules were checked against the public references on wizardofodds.com.

What it does well on this hardware

  • Full-speed screen: about 58 frames a second for a full redraw, once the board's peripheral clock is set from the system PLL (one machine.freq call at the top of pocket.py, see docs/HARDWARE.md).
  • Redraws only the strip of the screen that changed, so a button press answers in about 15 to 100 ms.
  • About 50 to 55 KB of RAM left while playing, on a board with 264 KB.
  • Art is optional. With no image files the game draws cards and the table in code.

Your own art (optional)

Sizes, names, and where text sits on each screen are in assets/ASSETS.md. In short: draw one 24-bit BMP per picture, magenta (255, 0, 255) is transparent, run python3 tools/convert_assets.py, and copy the files it writes to /assets/ on the board. The menu background is a full-screen 240 x 240 image you supply yourself (assets/src/ui/menu_background.bmp). None is included.

Repository layout

text
pocket.py          the game's start file on the board (menu)
lib/               shared modules for the board: screen, fonts, buttons, images, saving, cards, clock fix, poker
games/             one set of modules per game: rules, table logic, screens
archive/           shelved work (slots)
assets/            art spec and the converter's input and output folders
tools/             Mac-side tools: image converter, odds simulators, upload checker
tests/             automated tests (run on a computer, no board needed)
hw/ hwtest/        measured hardware budget, board notes, reviews, and the benchmark scripts
docs/              hardware reference sheet, the AI team guide, role files
pcb/               workspace for designing your own board from this hardware (first-timer guide, in progress)
pm/                decision requests, rulings, decision log, hand-off notes
SETUP.md           follow-along install guide
UPLOAD.md          exact file list for the board, checked by tools/check_upload.py
main_monolith.py   the original single-file program this project replaced (read-only)

Running the tests

bash
python3 -m unittest discover -s tests

They run on a normal computer with stand-in modules for the board.

Troubleshooting

What you seeWhat to do
The board does not show upUse a data cable. Close Viper IDE and its tab: only one program can use the USB port at a time
Dark screenFAST_SPI = False in pocket.py
"no module named ..."A file is missing or in the wrong folder. Compare with SETUP.md, Step 4
"could not enter raw repl"The board is fine. Unplug it, or run hwtest/unwedge.py

More in SETUP.md.

Credits

  • The screen driver and font in main_monolith.py, and the code adapted from it, started from Tony Goodhew's Waveshare 1.3" workout (August 2021).
  • Rules and house edges were checked against the public pages on wizardofodds.com.
  • MicroPython firmware is a public download from micropython.org and is not stored here.
  • Waveshare datasheets and demo code are not included.

Issues

Open an issue with the step you were on, what you saw, and the full terminal output. Please do not post anything private.

Parts

150
QtyValueFootprintReferences
21100nFCapacitor_SMD:C_0402_1005MetricC1, C2, C3, C4, C10, C18, C19, C24, C27, C28, C34, C35, C36, C37, C39, C43 +5
1310kResistor_SMD:R_0402_1005MetricR4, R6, R7, R12, R13, R26, R27, R28, R29, R30, R34, R37, R42
610uFCapacitor_SMD:C_0603_1608MetricC11, C21, C22, C32, C33, C38
61kResistor_SMD:R_0402_1005MetricR3, R5, R18, R25, R35, R43
6tie-down holeH1, H2, MH1, MH2, MH3, MH4
51uFCapacitor_SMD:C_0603_1608MetricC20, C30, C31, C41, C42
4100kResistor_SMD:R_0402_1005MetricR19, R23, R24, R39
44.7uFCapacitor_SMD:C_0402_1005MetricC13, C14, C15, C40
210uF 10V X5RCapacitor_SMD:C_0805_2012MetricC25, C26
215pFCapacitor_SMD:C_0402_1005MetricC16, C17
227RResistor_SMD:R_0402_1005MetricR10, R11
24.7kResistor_SMD:R_0402_1005MetricR31, R32
2470RResistor_SMD:R_0402_1005MetricR20, R33
25.1kResistor_SMD:R_0402_1005MetricR8, R9
2GNDTestPoint:TestPoint_Pad_D1.5mmTP5, TP6
1+3V3TestPoint:TestPoint_Pad_D1.5mmTP3
10RResistor_SMD:R_0603_1608MetricR22
10RResistor_SMD:R_0402_1005MetricR49
11.8kResistor_SMD:R_0402_1005MetricR14
1100RResistor_SMD:R_0402_1005MetricR50
110nFCapacitor_SMD:C_0402_1005MetricC29
110uF 16V X5RCapacitor_SMD:C_0805_2012MetricC23
112MHz ABM8-272-T3Crystal:Crystal_SMD_3225-4Pin_3.2x2.5mmY1
11V1TestPoint:TestPoint_Pad_D1.5mmTP4
12.2uFCapacitor_SMD:C_0603_1608MetricC12
12.2uH ASPIAIG-F4020-2R2MInductor_SMD:L_Abracon_ASPIAIG-F4020L2
12.7kResistor_SMD:R_0402_1005MetricR51
1200RResistor_SMD:R_0402_1005MetricR1
12kResistor_SMD:R_0402_1005MetricR21
13.0kResistor_SMD:R_0402_1005MetricR15
13.3uH AOTA-B201610S3R3-101-Tpcb_custom:AOTA-B201610SL1
133RResistor_SMD:R_0402_1005MetricR2
147kResistor_SMD:R_0402_1005MetricR44
15.6kResistor_SMD:R_0402_1005MetricR36
168kResistor_SMD:R_0402_1005MetricR16
1A PTS125SM43SMTR2LFSButton_Switch_SMD:SW_Push_1P1T_NO_CK_PTS125Sx43SMTRSW4
1AO3400APackage_TO_SOT_SMD:SOT-23Q3
1AO3401APackage_TO_SOT_SMD:SOT-23Q4
1AO3401A (DNP: fit only for a direct-drive BL module)Package_TO_SOT_SMD:SOT-23Q6
1APS6404L-3SQR-SNPackage_SO:SOIC-8_3.9x4.9mm_P1.27mmU3
1B PTS125SM43SMTR2LFSButton_Switch_SMD:SW_Push_1P1T_NO_CK_PTS125Sx43SMTRSW5
1BAT+TestPoint:TestPoint_Pad_D1.5mmTP7
1BOOTButton_Switch_SMD:SW_SPST_PTS645Sx43SMTR92SW1
1BQ24074RGTRPackage_DFN_QFN:VQFN-16-1EP_3x3mm_P0.5mm_EP1.68x1.68mm_ThermalViasU5
1CELL_FTestPoint:TestPoint_Pad_D1.5mmTP10
1CELL_PTestPoint:TestPoint_Pad_D1.5mmTP9
1CHGLED_SMD:LED_0603_1608MetricD1
1CR1220Battery:BatteryHolder_Keystone_3001_1x12mmBT2
1DPAD DOWN PTS645SM43SMTR92Button_Switch_SMD:SW_SPST_PTS645Sx43SMTR92SW9
1DPAD LEFT PTS645SM43SMTR92Button_Switch_SMD:SW_SPST_PTS645Sx43SMTR92SW10
1DPAD PRESS PTS645SM43SMTR92Button_Switch_SMD:SW_SPST_PTS645Sx43SMTR92SW12
1DPAD RIGHT PTS645SM43SMTR92Button_Switch_SMD:SW_SPST_PTS645Sx43SMTR92SW11
1DPAD UP PTS645SM43SMTR92Button_Switch_SMD:SW_SPST_PTS645Sx43SMTR92SW8
1DS3231MZ+Package_SO:SOIC-8_3.9x4.9mm_P1.27mmU9
1DW01APackage_TO_SOT_SMD:SOT-23-6U7
1Expansion (6 = VBAT_SENSE ADC node, not free GPIO)Connector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_VerticalJ8
1FS8205APackage_SO:TSSOP-8_4.4x3mm_P0.65mmQ1
1LCD 1.54in ST7789 module, JST-PH 8-pinConnector_JST:JST_PH_S8B-PH-SM4-TB_1x08-1MP_P2.00mm_HorizontalJ4
1LCD header 2.54 mm (wire by name; one screen at a time)Connector_PinHeader_2.54mm:PinHeader_1x08_P2.54mm_VerticalJ9
1LCD_SCKTestPoint:TestPoint_Pad_D1.5mmTP14
1LSM6DSOXTRPackage_LGA:LGA-14_3x2.5mm_P0.5mm_LayoutBorder3x4yU10
1LiPo JST-PH 2.0mm (1 = + RED WIRE, 2 = -)Connector_JST:JST_PH_S2B-PH-SM4-TB_1x02-1MP_P2.00mm_HorizontalJ3
1MF-MSMF150/16X-2 1.5Apcb_custom:Fuse_Bourns_MF-MSMF_1812F1
1PAM8302AADCRPackage_SO:SOIC-8_3.9x4.9mm_P1.27mmU8
1POWER PCM12Button_Switch_SMD:SW_SPDT_PCM12SW3
1RESETButton_Switch_SMD:SW_SPST_PTS645Sx43SMTR92SW2
1RM2pcb_custom:RM2U11
1RP2350APackage_DFN_QFN:QFN-60-1EP_7x7mm_P0.4mm_EP3.4x3.4mmU1
1RTC INT to GP14 (open; close only after firmware sets IMU INT1 open-drain, active-low)Jumper:SolderJumper-2_P1.3mm_Open_Pad1.0x1.5mmJP2
1RUNTestPoint:TestPoint_Pad_D1.5mmTP8
1SCLTestPoint:TestPoint_Pad_D1.5mmTP12
1SDATestPoint:TestPoint_Pad_D1.5mmTP11
1SD_SCKTestPoint:TestPoint_Pad_D1.5mmTP13
1STEMMA QTConnector_JST:JST_SH_SM04B-SRSS-TB_1x04-1MP_P1.00mm_HorizontalJ7
1SWDConnector_PinHeader_1.27mm:PinHeader_2x05_P1.27mm_Vertical_SMDJ1
1Speaker JST-PHConnector_JST:JST_PH_S2B-PH-SM4-TB_1x02-1MP_P2.00mm_HorizontalJ5
1TPS63001DRCRPackage_SON:Texas_DRC0010J_ThermalViasU6
1USB4085-GF-AConnector_USB:USB_C_Receptacle_GCT_USB4085J2
1USBLC6-2SC6Package_TO_SOT_SMD:SOT-23-6U4
1USERLED_SMD:LED_0603_1608MetricD2

The 144 most common of 150 parts.

Similar boards

  • 2 layers151 × 95 mmDeneme, the printed circuit board in 3D

    Deneme

    g210101021/OpenStylophone-RP2040

    Overview • Technical Summary • Architecture • Hardware Audit & Remediation • Schematic Subsystems • PCB Layout • Firmware Roadmap • Bill of Materials • Author

    143 parts
  • 4 layers125 × 100 mmRC controller, the printed circuit board in 3D

    RC controller

    tyke01/bonk

    An open source RC controller.

    72 parts
  • 4 layers65.1 × 132.8 mmFX580 Main EPD LAYOUT V8, the printed circuit board in 3D

    FX580 Main EPD LAYOUT V8

    ThVerstappen/AI-Fx580VNX

    Revision mới nhất hoàn tất ngày 11/10/2026. Mở FX580MainEPDLAYOUTV8.kicadpro bằng KiCad 10.0.5; PCB và schematic cùng tên. Thư viện local dùng ${KIPRJMOD}/lib.

    132 parts
  • 4 layers65 × 100 mmPGR, the printed circuit board in 3D

    PGR

    Projeto-Guarda-Rios/PCB

    O repositório para a PCB do Projeto Guarda Rios! Inclui todos os ficheiros relacionados com a PCB!

    167 parts2MIT
  • 2 layers62.5 × 42.5 mmOpen bus stop, the printed circuit board in 3D

    Open bus stop

    N8BWert/open-bus-stop

    An informal bus display

    41 parts1
  • 4 layers99 × 54 mmFrank next, the printed circuit board in 3D

    Frank next

    rh1tech/frank

    RP2350 Based Hardware Emulation Platform

    253 parts66GPL-3.0
  • 4 layers80.6 × 54 mmFrank core2, the printed circuit board in 3D

    Frank core2

    rh1tech/frank-lab

    FRANK Board Laboratory (work-in-progress board prototopyes)

    195 parts4GPL-3.0
  • 2 layers50.2 × 95.2 mmCheetoPet, the printed circuit board in 3D

    CheetoPet

    Cheet0sDelet0s/cheetoPet

    an esp32 s3 based tamagotchi

    104 parts3GPL-2.0

Questions

How big is the Run3 PCB?

It measures 150 × 100 mm and has 4 copper layers, 1.6 mm thick.

What parts does the Run3 use?

150 parts, built around the RP2350A, PAM8302AADCR, APS6404L-3SQR-SN and BQ24074RGTR. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Run3 KiCad files?

From the John-ODell/pocket-chance repository on GitHub, at the commit this page was made from: the board is pcb/kicad/routing/run3.kicad_pcb and its schematic pcb/kicad/pocket-chance-board.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Run3 design in my own project?

Its repository states no licence, so its author keeps all rights: ask John-ODell before reusing the design.