Arduino project · firmware v2

Busfahren♥♦♣♠

Busfahren (“bus driving”) is a well-known German pub card game. I built it as a handheld with a 16×2 display, operated with a rotary knob (potentiometer) and a push button. Here you can play it in your browser with the real game logic.

HD44780 · 16×2
Live demo
Pot 512 · - Phase 1 / 4
Pot · Select
Button · Confirm
Buzzer · Reset

Turn the knob to choose, OK confirms, and a long press jumps straight to the bus ride. On a keyboard, use ← → and Enter.

01

How the game works

Four questions, then the bus

A right guess takes you to the next question. A wrong guess means as many sips as the question's number, and you start again. After four questions comes the bus ride.

Question 1

Red or black?

You guess the colour of the first card. Knob to the left means red, to the right black.

Question 2

Higher or lower?

You guess whether the next card is higher or lower. A tie does not count.

Question 3

Between or outside?

You guess whether the third card falls between the first two or outside them.

Question 4

Which suit?

You guess the suit: hearts, diamonds, clubs or spades. Each suit has its own range on the knob.

Finale

Busfahren

Now you have to guess “higher or lower” correctly five times in a row. One mistake and the ride starts again.

02

Building the handheld

Parts & wiring

Components

Arduino Uno (or Nano)Core, 5 V logic1×
LCD 16×2, HD44780Standard character display1×
Pot 10 kΩGame selection → A01×
Pot 10 kΩLCD contrast (V0)1×
Push buttonConfirm → A11×
Piezo buzzer, passiveTones → D13 (for tone())1×
Resistor 220 ΩLCD backlight (pin A)1×
OLED SSD1306 128×32Scrolling text, optional → I²C0 to 1×
Breadboard + jumper wiresWiring-
The buzzer must be passive since an active one cannot play a melody.

Wiring

ComponentPinArduino
LCD RS4D7
LCD E6D6
LCD D411D5
LCD D512D4
LCD D613D3
LCD D714D2
LCD RW5GND
LCD V03Pot wiper
LCD VSS / K1 / 16GND
LCD VDD25V
LCD A155V · 220Ω
Game potWiperA0
Button-A1 → GND
Buzzer +-D13
OLED SDA / SCL-A4 / A5
The button sits between A1 and GND; no resistor is needed.
ARDUINO UNO D2-D7 · A0 · A1 · D13 · A4/A5 5V · GND Busfahren v2.ino LCD 16×2 HD44780 · 4-bit D2-D7 Pot · A0 Button A1 → GND Buzzer D13 OLED (optional) I²C · A4/A5
03

The firmware

Version 2

In version 2 of the firmware I fixed several weaknesses. It runs more reliably, and the cards are dealt more fairly.

01
Bus without recursion. Restarts run in a loop, so memory does not fill up.
02
Fair cards. The cards are unsorted, so no answer is always right.
03
Clean edge cases. “Between/Outside” also scores boundary values correctly.
04
One button handler. The button is debounced. A short press counts on release, a long press exactly once.
05
Real randomness. Every time you switch it on, you get a new card sequence.
06
Loop runs smoothly. The OLED scrolling text slows nothing down and can be switched off.
⇩ Request firmware v2 ⇩ Download this page Everything offline · no external requests

Contact

Write to me if you have questions about the build or would like to make your own handheld.

Arithmetic check Arithmetic task, shown as an image

Your details are processed in order to answer your enquiry. More in the privacy notice.

No Google captcha, no cookies, no disclosure to third parties. Alternatively by e-mail to info@timobritz.de.