Skip to content

louazz/ESP32-BarcodeShop

Repository files navigation

ESP32 BarcodeShop

A Bluetooth-integrated Point-of-Sale (PoS) system using the ESP32 and Cheap Yellow Display.

Project Banner

📌 Project Overview

ESP32 BarcodeShop is a distributed commerce system that bridges the gap between digital inventory and physical displays. It utilizes an ESP32 (Cheap Yellow Display) as a dynamic barcode terminal.

The system allows administrators to broadcast product UUIDs via Bluetooth Low Energy (BLE) to the ESP32, which generates a real-time, scannable barcode. Users can then scan these barcodes using a hardware scanner (like the Eyoyo EY-015P) or a mobile camera to trigger secure transactions via a Flask-based backend.

🛠 Tech Stack

Layer Technologies
Hardware ESP32-2432S028 (Cheap Yellow Display)
Firmware MicroPython, LVGL (Graphics), BLE Stack
Backend Flask (Python), JWT Authentication
Scanning OpenCV (Camera-based), Eyoyo HID (Hardware-based)
Communication Bleak (BLE Client), Requests (HTTP API)

🚀 Use Cases

  • Secure Authentication: User registration and login managed via JWT tokens.
  • Inventory Management: Admins can dynamically add products to the centralized store.
  • Remote Display Control: Admins push product UUIDs to the ESP32 terminal via Bluetooth.
  • Dynamic Barcode Generation: The ESP32 renders scannable 1D barcodes (Code 128) on the fly.
  • Instant Transactions: Scanning a terminal barcode triggers an automated purchase request to the backend.

🔄 System Architecture

Sequence Diagram Detailed workflow of barcode generation and transaction processing.

Workflow Breakdown

  1. Broadcast: The Admin client uses Bleak to send a product UUID to the ESP32 via Bluetooth.
  2. Render: The ESP32 processes the UUID and uses an LVGL canvas to render a Code 128 barcode with proper start/stop guard patterns and checksums.
  3. Capture: A user scans the terminal using an Eyoyo scanner or an OpenCV-powered camera module.
  4. Execute: The scanner/app sends an authenticated POST request (including the JWT token) to the Flask server.
  5. Confirm: The server validates the transaction, checks user balance/permissions, and updates the inventory.

📋 Prerequisites & Setup

Note: This project assumes the user is authenticated. A valid JWT token must be present in the request headers to perform transactions.

  1. Flash Firmware: Ensure MicroPython with LVGL support is flashed to the ESP32.
  2. Backend: Run the Flask server and ensure the ESP32/Client can reach the API endpoint over the network.
  3. Bluetooth: Pair your admin device with the ESP32 "BarcodeShop-Terminal."

✍️ Author

Developed by Louai Zaiter (2026)
Created for the Aberystwyth University ESP32 Hackathon.

About

ESP32 BarcodeShop is a distributed commerce system that bridges the gap between digital inventory and physical displays. It utilizes an ESP32 (Cheap Yellow Display) as a dynamic barcode terminal.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages