This code allows ChatGPT to be interfaced on a TI 84 Plus CE calculator. Using the CE C/C++ Toolchain, a program was written that allows users to enter a prompt on the calculator and send the prompt to a computer connected over USB (via serial). The computer then takes the prompt, makes the API call, and passes the response back to the calculator over serial.
To use this program, you will need to install the following:
- TI Connect™ CE software to transfer the program onto the calculator (available from the TI website)
- The DEMO.8xp program (included in this repository)
- calcgpt.py (included in this repository)
- Python (available from the Python website)
- The PySerial library (can be installed by running
pip install pySerial
) - The OpenAI API (available from the OpenAI website)
- The OpenAI Python library (can be installed by running
pip install openai
)
- Connect the calculator to your computer via USB.
- Transfer the DEMO.8xp program to your TI 84 Plus CE calculator using TI Connect™ CE software.
- Launch the program on your calculator by going to the catalog and selecting
Asm(
. Then, open the programs menu, select DEMO, and press enter twice to run it. The calculator will display "ready" when the program is ready to use. - Run the python program included in this repository.
- Select the COM port the calculator is connected to when prompted by the program.
- The calculator should display that it has connected. From here, press the "2nd" key to enter a prompt.
- The response from ChatGPT will be displayed on the calculator screen.
- This program has only been tested on a TI 84 Plus CE calculator and may not work on other calculator models.
- Newer TIOS versions may require modification to run the program. I am running it on OS 5.1
- The OpenAI API requires an API key, which can be obtained from the OpenAI website. You will need to set this API key as an environment variable named
openai.api_key
in the python script. - There are some issues getting input from the user that you may run into.