You are browsing as a guest. Sign up (or log in) to start making projects!

2h 14m 19s logged

Building ‘HackCalc’: An ESP32 Calculator, AI Terminal, and pentesting tools. Hi everyone. I wanted to share a project I’ve been working on called HackCalc. I’ve recently started diving into embedded systems, and as I’m actively learning C++ for Arduinos and microcontrollers, building this from scratch has been an incredible trial by fire. I’m documenting the journey and hopefully providing a useful reference for other developers and students building similar portable devices.## The Core Concept HackCalc is a custom-built pocket calculator designed for both simple and complex calculations, with integrated AI and hardware hacking tools.* The Brain: ESP32 development board that handles Wi-Fi and hardware protocols. * The Display: 2.8-inch SPI TFT display (ILI9341) running a custom green and amber retro-styled GUI.* The RF Tool: A CC1101 wireless transceiver module that also functions as a sub-1 GHz radio detector.## The AI Engine: The terminal successfully pings the Groq API over Wi-Fi. I’m using HTTPClient and ArduinoJson to send queries to it. I initially built a prototype breadboard using a 4x4 numeric keypad and a custom C++ T9 multi-tap state machine. However, writing long AI prompts on a 16-key keyboard is difficult, so I’m upgrading to a 5x9 pushbutton matrix (45 keys). Since an ESP32 doesn’t have the GPIO pins for a 45-key array, an SPI display, an RF module, and more, I’m solving the bottleneck with hardware:* Shift registers: I’m daisy-chaining two 74HC595 shift registers to have 16 output pins for column scanning, using only a few ESP32 pins.* Shared SPI bus: The TFT display, CC1101, 74HC595, and more modules share the same hardware SPI lines (MOSI, MISO, SCK) using dedicated CS pins. I’ve been using a 24MHz logic analyzer to debug the bus contention.## Next steps and open to advice! I’m currently migrating the breadboard circuit to a PCB. Since I’m just getting started with embedded systems and C++, any help, advice, or code review would be immensely appreciated! Whether it’s advice on handling shared SPI buses, optimizing C++ array scans, or ESP32 memory management, I’d love to hear your thoughts. I really hope that documenting this helps developers and students who are trying to bridge the gap between physical electronics and software. Thanks for reading!

0
14

Comments 0

No comments yet. Be the first!