Get in touch

Home/Projects/Piața Drăgaica Buzău

Case study · Tested, in delivery

Turnstile access with QRtickets and card payment

Piața Drăgaica in Buzău asked us to modernize access at five existing turnstiles: QR-code tickets issued at the cash desk, card payment directly at the turnstile, and real-time reporting per cashier. We built the whole system, from the board inside the turnstile to the central server, and validated it end to end at all five entrances.

5 / 5turnstiles validated end to end: scan, server, relaytest, 15 Sep 2026
5 / 5ESP32 boards with firmware written remotely8 Oct 2026
6 typesof ticket: single, multiple entries, pass, time slot, day, periodcash desk app
≤ 1 suntil the turnstile app restarts if it is closeddesign parameter
The situation

Where we started

The turnstiles were already there. The owner wanted to fit them with unattended card terminals and QR readers, and to have complete software: a cash desk sales app, a server with a database and API, and an app on each turnstile.

Tickets had to cover several cases – single entry, multiple entries, passes – and sales had to be visible in real time per operator. The computers, thermal printers and server belonged to the owner.

What we did

The solution

  • a cash desk app that issues and prints QR tickets, with an end-of-shift handover receipt and a report sent automatically by email;
  • on each turnstile: a mini PC, a QR reader, an unattended card terminal and an ESP32 board that controls the unlocking and the green/red signal light;
  • a central server with a REST API and PostgreSQL that validates each entry and keeps the statistics;
  • everything on the local network: an internet outage does not stop access;
  • a web panel for updating the code and firmware on all turnstiles, with a backup and automatic rollback.
How it works

A ticket's path, cash desk to turnstile

A card payment at the turnstile is recorded on the server just like a validated ticket.

Ticket at the deskissued from the app, printed on the thermal printer
Scan or cardQR reader or card terminal at the turnstile
Validationthe server checks the ticket; a single-use ticket is refused the second time
Unlockthe ESP32 pulses the relay and turns the light green
Statisticssales and entries per cashier and per turnstile

Cash desk

A desktop app in kiosk mode, with operator login.

  • QR tickets on a thermal printer
  • live statistics: tickets, active, cashed in
  • shift handover with receipt and email
  • schedulable daily report

The turnstile

Runs unattended and recovers on its own where possible.

  • automatic start and a supervisor
  • automatic detection of the reader and the board
  • pause mode for maintenance
  • default state: locked

Central control

One place to see and maintain all five entrances.

  • status: online, reader OK, ESP32 OK
  • versions verified with a SHA256 fingerprint
  • automatic rollback after 3 failed starts
  • firmware written with a copy of the old one
Problems solved

What we learned on site

The reader stopped during remote sessions

Desktop Windows has a single interactive session: a remote desktop connection takes it over, and the QR reader, which behaves like a keyboard, is left without a window. This cannot be worked around in code, so maintenance is done with a tool that mirrors the session, and the app brings its focus back on its own within one second.

The app started twice

On the unattended computers we saw duplicate processes and restart loops: a serial port still in use, a file lock that was not atomic, an old supervisor left running. We fixed them one by one, with retries, a Windows mutex and cleanup of leftover processes.

New firmware without a "dead" turnstile

Before writing new firmware, the app saves the existing firmware from the board; if saving fails, it writes nothing. If a write fails, it restores the copy. The errors on two boards turned out to be socket contacts, not software.

Status on 7 Nov 2026: the production server is installed in Buzău; remote code updates are implemented and tested locally, and are yet to be validated on the five turnstile computers.

Claude's role

What Claude did on the project

We work step by step: Claude proposes a single instruction, we run it on the equipment and give it the result, then comes the next step.

What Claude did

  • wrote the turnstile app and its supervisor
  • wrote the central control module and the ESP32 board firmware
  • analysed the logs when something did not work on site
  • recorded each work session and the files changed

What we did

  • wiring the boards, mounting and installation on the five computers
  • on-site tests with the reader and the relay
  • the requirements from the field: forced focus, pause mode, control from a single place
  • the decisions, final verification and the relationship with the client

Nothing reached the turnstiles without testing, rollback steps and a person's confirmation.

Do you have turnstiles that need to take payments?

Tell us how many entrances you have, what kinds of tickets you sell and how you want people to pay. We start from the existing equipment.

Request an assessment →