June 17, 2025
Shipwright gave you feedback
Seems like a handy calculator! One thing I have noticed is that clicking "Toolbox" (not in the video) and attempting to press the right arrow or equals button on "Calculus" doesn't work, but that could be a me problem.
Devlog #14
Created the demo link using emscripten
making the demo interactive helps in getting more votes
Check mismatched parentheses at the very end of parsing to avoid raising an error early
Use error popup like in Numworks instead of displaying errors in answer field
Automatically align result of calculations under input based on how long it is
Display answer based on significant figures (max 10)
Use infinity symbol in answer field when answer is infinity
Remove slow graphing since it was causing issues
Raise error if there is a decimal point without a number on the right of it
Updated the README with build instructions in preparation for my first ship
Fixed minor errors
Devlog #11
Created a popup screen that allows users to store data in variables
Created a popup error message that shows when the user inputs invalid data in the variable definition popup screen
Modified the text functions to accommodate the variable definition popup text areas, added a guard to prevent writing past buffer length, fixed a few minor errors
Devlog #11
Disabled certain inputs in menu and graph screens
Interpreter can now evaluate Euler's number and other variables
Lexer can now recognize decimals without leading zero
Added ex and *10x buttons and functionality
Added factorial button and functionality
Disabled input when toolbox is open
Fixed status bar label alignment
Implemented interactive toolbox navigation
Added round function to toolbox
Also began working on VAR button to allow users to store values in variables
Devlog #10
Added slow graphing
Created a toolbox to input various functions
Added calculator name/version on top
An italic x is now displayed instead of normal x in input areas
Fixed labels and their alignment
Added a new error type (Argument error)
Raise an error if more than one decimal point is present in a number
Devlog #9
Made graph gridlines more aesthetic
Implemented graph navigation and zooming
In the graph input screen, / is now shown instead of the division symbol for better readability
Refactored graph input screen code
Devlog #8
Implemented graphing, used Xiaolin Wu's line algorithm to produce anti-aliased lines
Refactored code
Changed VARS button to x
Added x button functionality, lexer now recognizes and tokenizes x variable
Added hyp button, functionality, and Ans button functionality
Switched up the colors in graph input screen
Implement interpreter error handling functionality, errors like syntax and divide by zero errors are now displayed in answer field instead of crashing the program
Added shift, alpha, hyp labels to status bar
Added implicit multiplication between variables
Devlog #7:
Created basic settings menu which contains angle measure settings and result format settings
Evaluation of trigonometric functions is now based on the angle measure setting that can be selected in Angle measure section in the settings menu, angles can be in radians, gradians or degrees, by default they are in degrees.
The result format setting can be in standard notation (normal), scientific notation or engineering notation
I also made progress in the graphing department, now using lvchart instead of lvcanvas for smoother graphs, all kinds of functions can now be properly graphed, except functions with asymptotes, im working on that fix. After that, i will work to make the graphs appear smoother, then allow graphs to be navigated using the navigation buttons
Devlog #6:
Finally added smart left, right navigation, deletion and addition, fixed all the brutal segfaults related to input
Started working on settings screen
Refactored screen code and disabled input in graph screen
Colored DEL and AC buttons
Now last selected button is focused when menu button is pressed
Make AC button only work in main input screen
Fixed dark mode colorscheme
Welcome to my 5th devlog
Created a new screen to input functions that will be plotted on the graph
Created graph screen with grid
Added a new dark mode colorscheme and added the ability to switch between light and dark modes
Disabled input in the menu screen
Refactored the button matrix callbacks significantly
Hello, this is my 4th devlog:
Added menu back button functionality
Refactored input code
Enabled evaluation of Pi
Now a combination of Noto Sans Math and Noto Sans is in use for displaying Unicode
Add output buffer for displaying Unicode symbols in input area
Use Unicode symbols for Pi, multiplication, division, square root
Added ALPHA functionality, also added variables
Display sin-1, cos-1, tan-1 instead of arcsin, arccos, arctan
Make x2 button look better
Use index of pressed button instead of text to recognize which button was pressed
Reformatted button text
Add square root
Reorganized directory structure
Made a lot of progress in graphing
Reorganized all the UI code for better readability and easier development
Devlog: EPC10
Welcome to my first (late) dev-log, it details almost everything I did during the first 90ish hours of development.
Project Description
This project aims to develop an open-source programmable graphing calculator, that is fully extendable by the user, rivaling popular calculators like the Ti-84, while being cheaper. First as a fully featured PC simulator, and eventually, the project will be ported to a physical ESP32 based device.
Core Systems Implemented
So far, the following core software systems have been developed and tested:
Expression Interpreter:
Built with a 3-stage architecture:
1- Lexer: tokenizes mathematical input (e.g., numbers, functions, operators).
2- Recursive Descent Parser: generates an abstract syntax tree with support for operator precedence.
3- Evaluator: evaluates the AST to compute final results.
UI System (LVGL):
Used LVGL to create a basic UI:
Supported Expressions
The interpreter currently supports a robust set of mathematical features:
This foundation enables parsing and evaluation of complex expressions like:
sin(90) + 3 * (2 ^ x)
Parsing Challenges
The parser was the most technically demanding component. I implemented a recursive descent parser, which required an in-depth understanding of:
I also studied alternative parsing techniques (like Pratt and LL parsers), but went with recursive descent instead.
Evaluation Strategy
Once the parser generated the Abstract Syntax Tree (AST), I built an evaluator that recursively traverses it. Each node represents an operation, value, variable, or function, which made debugging much easier.
Variables & Functions
The evaluator supports single-letter variables from A to Z, users can assign values to these and use them in expressions.
For functions, it supports a wide range of standard functions, including:
UI Design & PC Simulator
To simplify development, the screen component was designed to be shared between the PC simulator and the planned ESP32 port, ensuring consistency across platforms.
The PC simulator features a virtual keypad for input.
Built using the latest LVGL version, leveraging a variety of widgets, containers, and styles to create a clean, responsive interface.
Implemented manual hit testing on navigation buttons to improve input accuracy and responsiveness in the simulator environment.
Used LVGL’s flexbox layouts and custom styling to arrange buttons, input fields, and menu components intuitively.
UI Challenges & Solutions
The UI development presented several technical hurdles:
LVGL’s built-in hit testing struggled with closely spaced navigation buttons, causing input detection to be inaccurate at best. The solution was manual hit testing, where I calculated if the click was on the right, left, top, or bottom button
Using LVGL’s default character deletion caused problems with multi-character functions (e.g., deleting just ‘n’ from sin(30) left invalid input like si(30)). To address this, I implemented smart deletion that removes entire function names at once, preventing syntax errors, like modern calculators do.
Programmatic scrolling allowed scrolling beyond the content area (above top or below bottom). I used LVGL’s built-in functions to prevent scrolling beyond content.
Debugging & Testing
To ensure stability, I relied heavily on debugging tools:
Next Steps
After all of that, I will move on to hardware integration with the ESP32 and a TFT display. Finally, I plan to explore making the calculator programmable.
An open source graphing calculator
This was widely regarded as a great move by everyone.