Stats

1
Projects
14
Devlogs
0
Votes
1
Ships

Coding Time

All Time: 200h 29m
Today: 0h 0m

Member Since

June 17, 2025

Badges

1
🚢
Maiden Voyage
you shipped your first project! the journey begins...

Projects

1
Expandable Programmable Graphing Calculator 10
14 devlogs • 11 months ago

Activity

Solar
Solar Shipwright gave you feedback
269d ago

Expandable Programmable Graphing Calculator 10

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.

from Solar

Devlog #14

Created the demo link using emscripten

Update attachment
Anirudh
Anirudh Shipwright gave you feedback
270d ago

Expandable Programmable Graphing Calculator 10

making the demo interactive helps in getting more votes

from Anirudh

Devlog 13

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

Update attachment

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

Update attachment

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

Update attachment

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

Update attachment

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

Update attachment

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

Update attachment

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

Update attachment

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

Update attachment

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

Update attachment

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

Update attachment
  • Refactored most of the UI code
  • x2 button now works
  • Used macros for widths, heights, and colors
  • Fixed evaluation of inverse trigonometric functions
  • Completely changed the colorscheme
  • Added SHIFT and ALPHA buttons and functionality
  • Added displaying error message instead of nan and inf
Update attachment

Reorganized all the UI code for better readability and easier development

Update attachment

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:

    • Set up the screen system and navigation structure.
    • Designed the evaluation screen, and a basic menu
    • Implemented manual hit testing for the navigation buttons

Supported Expressions

The interpreter currently supports a robust set of mathematical features:

  • Arithmetic operations: +, -, *, /, ^
  • Grouping: Parentheses () for precedence
  • Functions: e.g., sin, cos, etc.
  • Variables: Basic variable parsing is implemented
  • Numbers: Support for integers and floats

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:

  • Expression grammar and operator precedence
  • Recursive function design for each grammar rule
  • Handling nested parentheses and functions

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.

  • Constants and variables returned values directly
  • Operators combined the results of child nodes
  • Used the C math library for functions

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:

  • Trigonometric: sin, cos, tan, and their inverses (asin, acos, atan)
  • Hyperbolic: sinh, cosh, tanh, etc.
  • Logarithmic: log, ln
  • Exponentiation and square roots

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:

  • Hit Testing Issues:

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

  • Input Deletion Handling:

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.

  • Scroll Boundary Fixes:

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:

  • Valgrind: Used to detect and fix memory leaks..
  • GDB: It allows you to backtrace which functions were called in what order, which proved invaluable in discovering the floating point exception error caused by LVGL’s built in hit-testing in the navigation buttons

Next Steps

  • Completing the menu system
  • Polishing the UI and everything else
  • Adding customized error messages to improve usability and debugging
  • Implementing the graphing engine to plot mathematical functions visually

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.

Ramez Hammad
Ramez Hammad created a project
328d ago

Expandable Programmable Graphing Calculator 10

An open source graphing calculator

Expandable Programmable Graphing Calculator 10
14 devlogs 0 followers Shipped
Ramez Hammad
Ramez Hammad joined Summer of Making
351d ago

This was widely regarded as a great move by everyone.