Inspiration

We were inspired by other computer algebra systems like Mathematica, Maple, and MatLab. However, we wanted to implement something like this on a TI-84 calculator, where such advanced technology is not available.

What it does

Our project connects a calculator over Wi-Fi to a remote server that serves as a computer algebra system, capable of symbolically computing integrals and derivatives, and passing the results back to the calculator to be displayed.

How we built it

We started by writing the computer algebra system in Python. We started simply from a string of characters, parsing that into tokens, then building a tree out of them, and writing rules that act on the tree. The entire process of performing the computation is simply transforming the tree over and over until we reach the final result.

We then switched gears and took apart a TI-84 calculator. After some probing, we figured out where to connect to power and ground and hooked up a ESP-8266 - a tiny microcontroller capable of Wi-Fi access. We used an Arduino Uno to connect the ESP-8266 to a laptop via a serial connection, to verify that we could send and receive data from the powered microcontroller. After that, we connected the microcontroller to UB's wireless networks and verified we could send and receive messages over the internet. To do this, we wrote z80 assembly code on the calculator itself, and C++ code on the Arduino to interface with it.

We then kicked off an AWS server to host our application. We moved all of our code onto the server and set up a socket connection for the microcontroller. We then wrote a Python program that would receive data from the calculator and parse it into a format we can handle in the rest of our code. From there we run our computer algebra system to compute the result, parse it back into the format the calculator understands, and send the resulting data back over the socket.

Challenges we ran into

We had several challenges at pretty much every step along the way. Our biggest challenge was taking the calculus that we know and write those rules as transformations on the tree. To do this, we took the definitions of the Product Rule, Quotient Rule, Chain Rule, etc. and rewrote those in the way the tree is represented in our program, then wrote code to match those patterns.

Although that was the most challenging part of derivatives, integrals were much, much more difficult. This is because there are less definitions to apply and more techniques to try - and even these may not work. Essentially we created many different algorithms to try and simplify the integral, and apply each one until the integral is simplified. Of course, not every integral can be solved, but this will handle basically every technique you study in Calculus I and II for solving them.

Accomplishments that we're proud of

We're very proud of the scope and depth of the work we did. Writing a computer algebra system we thought was a difficult challenge by itself - everything else we achieved was a stretch goal. Having made a complete product of such technical difficulty with practical applications is a huge feat, and we are very proud of what we've done in the last 24 hours.

What we learned

We learned such a wide variety of new things this weekend. We learned how to parse text using the pyparsing library, how to program algebraic techniques like polynomial division and calculus techniques like integration by parts and u-substitution, how to work with the internals of a TI-84 calculator and write in its assembly language, how to use C++ to program an ESP-8266, and how to put it all together with an AWS server via sockets.

What's next for BullframAlpha

When we work on this project in the future, we hope to refine the abilities of the computer algebra system to handle more advanced problems such as limits. We also hope to host a website and a mobile phone app that can interface with the computer algebra system to bring universal access to our program.

Built With

Share this project:

Updates