A smart calculator companion device with cloud connectivity, AI integration, and OTA updates.
π CalX Website β’ Features β’ Hardware β’ Setup β’ Build
- π WiFi Connectivity - STA/AP modes with captive portal for easy setup
- π± Device Binding - Secure pairing with CalX Dashboard via bind codes
- π¬ Real-time Chat - Send/receive messages from the dashboard
- π File Storage - Access synced notes and files on the device
- π€ AI Queries - On-device AI with multi-provider support (ChatGPT, Gemini)
- π OTA Updates - Over-the-air firmware updates with rollback support
- π Battery Management - ADC-based monitoring with low power modes
- πΊ OLED Display - 128x32 SSD1306 with multiple text sizes
Complete Bill of Materials to build your own CalX device.
| Component | Specification |
|---|---|
| Microcontroller | ESP32-WROOM-32 Dev Board (38-pin) |
| Dual-core 240 MHz, WiFi 2.4 GHz + Bluetooth | |
| USB-to-UART onboard, 4 MB flash |
| Component | Specification |
|---|---|
| OLED Display | 0.91" 128Γ32 SSD1306 (I2C) |
| White or Blue, 3.3β5V |
| Component | Specification |
|---|---|
| Tactile Buttons | 10Γ SMD or THT tactile switches |
| Navigation (β β β β), OK, Back, Menu, Shift, Power |
| Component | Specification |
|---|---|
| Battery | 3.7V Li-Po, 450β500 mAh (502030/WLY52535) |
| Charger | TP4056 Li-ion Charger (USB-C preferred) |
| Regulator | AMS1117-3.3V or ESP32 onboard |
| Power Switch | Slide switch (SPDT/SPST) |
| Component | Specification |
|---|---|
| Voltage Divider | 100kΞ© + 100kΞ© resistors |
| Polyfuse | 1206L050 (500 mA) |
| Component | Specification |
|---|---|
| Resistors | 10kΞ© (pull-ups), 100kΞ© (battery sensing) |
| Capacitors | 0.1Β΅F ceramic, 10Β΅F electrolytic |
| Component | Specification |
|---|---|
| Wires | 24β28 AWG, PVC or silicone |
| Connectors | DuPont 2.54mm, JST-PH 2-pin (battery) |
| Jumper Wires | M-M, M-F, F-F for prototyping |
| Component | Purpose |
|---|---|
| LEDs (3mm R/G/Y) | Status indicators |
| Micro-SD module | Extended storage |
| RTC module | Offline timekeeping |
βββββββββββββββββββββββββββββββββββββββ
β ESP32 Pinout β
βββββββββββββββββββββββββββββββββββββββ€
β I2C Display β
β SDA ββββββββ GPIO 21 β
β SCL ββββββββ GPIO 22 β
βββββββββββββββββββββββββββββββββββββββ€
β Battery ADC β
β VBAT βββββββ GPIO 34 (ADC1_CH6) β
βββββββββββββββββββββββββββββββββββββββ€
β Keypad Matrix (6 Rows x 5 Cols) β
β Rows βββββββ GPIO 4,5,18,19,23,25β
β Cols βββββββ GPIO 26,27,32,33,14 β
βββββββββββββββββββββββββββββββββββββββ
- macOS, Linux, or Windows with WSL
- Python 3.8+
- Git
# Clone ESP-IDF
mkdir -p ~/esp
cd ~/esp
git clone -b v5.2.2 --recursive https://github.com/espressif/esp-idf.git
# Install toolchain
cd esp-idf
./install.sh esp32
# Add to shell (add to ~/.zshrc or ~/.bashrc)
alias get_idf='. ~/esp/esp-idf/export.sh'git clone https://github.com/Saijayaranjan/CalX-Fireware.git
cd CalX-Fireware# Activate ESP-IDF environment
get_idf # or: . ~/esp/esp-idf/export.sh
# Set target chip
idf.py set-target esp32
# Build
idf.py build# Find your serial port
ls /dev/cu.usb* # macOS
ls /dev/ttyUSB* # Linux
# Flash and monitor
idf.py -p /dev/cu.usbserial-XXXX flash monitor
# Exit monitor: Ctrl+]build/
βββ calx_firmware.bin # Main firmware (~1 MB)
βββ bootloader/bootloader.bin # Bootloader (~27 KB)
βββ partition_table/ # Flash partition layout
βββ ota_data_initial.bin # OTA tracking data
CalX-Fireware/
βββ main/
β βββ app_main.c # Entry point
β βββ config/calx_config.h # Configuration
β βββ core/ # State machine, events, logging
β βββ drivers/ # OLED, keypad, battery, power
β βββ storage/ # NVS, security
β βββ network/ # WiFi, API client
β βββ ui/ # Display rendering
β βββ ota/ # Firmware updates
βββ CMakeLists.txt
βββ partitions.csv
βββ sdkconfig.defaults
- Power On β Boot screen displays "CalX v1.0.0"
- Not Bound β Screen shows "Not Bound - Press any key"
- WiFi Setup β AP mode starts:
CalX-Setup - Connect Phone β Join the AP, captive portal opens
- Select Network β Choose WiFi and enter password
- Binding β 6-digit code appears on screen
- Dashboard β Enter code at calxio.vercel.app
- Ready β Device shows idle screen with time
- ESP-IDF build completes successfully
- WiFi STA/AP modes with captive portal
- SSD1306 OLED display driver
- Matrix keypad input with debouncing
- Battery ADC monitoring
- Power management modes
- NVS persistent storage
- HTTPS API client
- OTA update infrastructure
- Requires hardware - All features need physical ESP32 + components
- Not tested end-to-end - Individual modules work, integration untested
- Display fonts - Only basic 8x8 font included
- Keypad layout - May need adjustment for physical button placement
MIT License - see LICENSE for details.
Part of the CalX Ecosystem
π CalX Website β’ Backend β’ Frontend
