How ozdemirsalih/casio-cheat-calculator works
Project type and purpose
• This is a hardware-software integrated “mod” for a Casio fx-82MS calculator.
• Purpose: embed an ESP8285 Wi-Fi microcontroller plus analog switches (74HC4051 muxes and SN74LVC1G3157) and a BMX055 IMU to (a) remotely drive the calculator by simulating key‐presses, (b) serve a web UI over Wi-Fi, and (c) use the IMU’s accelerometer for Morse-code input.
File structure
• Top-level files:
• Casio-Cheating-Calculator.ino – Arduino sketch containing firmware (Wi-Fi setup, websocket server, GPIO driver, I2C IMU code).
• Eagle Project.zip / Gerber Files.zip – PCB design source and manufacturing outputs.
• README.md – detailed description, wiring, UI screenshots, calibration instructions.
• No separate “frontend” folder: UI assets (HTML/JS/CSS, font file) are embedded in the .ino (likely in PROGMEM).
Extract architectural insights from the README
• ESP8285 runs in Access Point mode, hosts a websocket server + static web page.
• Two 74HC4051 ICs + one SN74LVC1G3157 form a matrix of switchable connections between calculator pad “KOx” and “KIy” pads.
• BMPX055 IMU connected via I2C for real-time accelerometer data at up to 2000 fps (used for Morse input + calibration UI).
• Power domain: Li-Ion battery protected by DW01A, external charger (TP4056 recommended).
Main components & interactions
a. Hardware blocks:
• ESP8285 Wi-Fi SoC (Microcontroller, Wi-Fi radio)
• Analog switching matrix:
– 2× 74HC4051 (8-channel MUX)
– 1× SN74LVC1G3157 (dual analog switch)
• BMX055 IMU (accelerometer + future gyro/magnetometer)
• Casio fx-82MS calculator PCB (KI/K0 pads)
• Power subsystem (Li-Ion battery + DW01A protector + external charger)
b. Software/network flows:
• Web browser client ↔ websocket ↔ ESP8285 (over Wi-Fi AP)
• ESP firmware:
– On incoming UI commands, send GPIO switching patterns to analog switches → simulate key presses on calculator.
– Poll I2C IMU → package accel/orientation data → stream via websocket to UI for real-time graph & calibration.
• UI: HTML/CSS/JS + custom fx-82MS font served from ESP’s onboard filesystem/flash.
Architectural patterns & principles
• Layered separation:
• Network/API layer (websocket, HTTP server)
• Business logic (key-mapping, Morse encoder, IMU calibration routines)
• Hardware abstraction (GPIO driver for analog switches, I2C driver for BMX055)
• Embedded‐server architecture: ESP as standalone AP + server
• Modular hardware design: switch matrix ICs abstract low-level pad wiring
– Clear block labels (e.g., “ESP8285 / Wi-Fi MCU”, “74HC4051 MUX #1”)
– Callouts for key design choices (e.g., “2000 fps I2C buffer = 192 bytes”)