An open-source MicroPython library for the Casio fx-CG100 calculator, which currently includes specialised scripts for fractal rendering and the plotting of hydrogenic orbital probability densities.
Requirements:
- A Casio fx-CG100 with MicroPython support and the latest official firmware installed.
- A desktop computer (either a laptop or PC).
- A standard USB-C data-transfer cable (avoid charging-only cables).
- If the calculator is not already on, do so by pressing the [ON] key. Check that your calculator's system firmware is up to date.
- Connect the calculator to a desktop computer using a standard USB-C data-transfer cable (avoid charging-only cables).
- When the Select Connection Mode dialogue box opens on the calculator screen, select the [1] USB Flash option and press the [OK] or [EXE] key to confirm.
- Wait for the display to indicate "Preparing USB". The calculator will then mount on your desktop environment as a generic USB external storage device. It should then be visible in your preferred file browsing interface.
- Every script in this repository is explicitly designed for the Casio fx-CG100. They are not guaranteed to function correctly on the Casio fx-CG50 or any other graphing calculator.
- Select your script by topic and expected runtime, and keep in mind that certain more advanced scripts may bring a longer runtime than others.
- Note that larger-scale programs (such as the hydrogen atomic orbital visualiser
psi_fx.py) require their companion dependency files (psi_fx_lib.py) to be transferred to the exact same folder to execute successfully. - When testing a script on-device for the first time, accept the default parameters by pressing the [OK] or [EXE] key on empty input prompts, and only increase complexity once the script produces any successful result.
Copy the chosen .py script file (and its required _lib.py dependency file, if applicable) from this repository into the main root directory or a designated sub-directory located within the calculator's mounted storage memory.
- Safely eject the calculator's drive volume from your desktop computer, then disconnect the USB-C cable to return the calculator to its normal operating system mode.
Caution
Never pull the cable out without safely ejecting the drive volume first. Improper disconnection can corrupt the calculator's storage memory filesystem or cause unforeseen consequences and may result in data loss.
- Select the Python application from the calculator's main home icon grid either by arrow keys or the [ALPHA] + [D] shortcut and press the [OK] or [EXE] key to launch it.
- Press the [⋯] (TOOLS) key to open the Tools menu, select [2] File >, and then [2] Open to navigate to the Load menu to browse directories within the calculator's storage memory for your preferred script.
- Press the [⟶|] (RIGHT TAB) key to switch the active view from the Editor to the Shell tab, which will execute your script immediately. Alternatively, press the [⋯] (TOOLS) key to open the Tools menu, and select [4] Run to execute your script via the Shell tab.
- Input chosen configuration values at the on-screen shell input prompts. The script will pause upon completion to keep the output pinned to your screen until you press the [AC] or [⏎] (RETURN) key to exit.
Requirements:
- Installation of Python 3.13, a newer version, or the latest stable one.
- Installation of the
casioplotstub python package (usepip install casioplot), which emulates the calculator's native graphics API.
Run any script directly from the repository root:
python3 fractals_chaos/mandelbrot_set.py
python3 physics/psi_fx.pyIf working inside a virtual environment:
./your_env/bin/python fractals_chaos/barnsley_fern.pyThis repository is released under the MIT Licence.
You are free to use, copy, modify, merge, publish, distribute, sublicense, and sell copies of the scripts, provided the original copyright notice and this licence notice are retained in all copies or substantial portions of the software.
See the LICENSE file in the repository root for the complete licence text.

