Influenced by the desire to combine software and hardware to make something fun, our team decided to make a robot (named Roger) that would graph an equation for us. Our goal for this project was finally realized after 36 hour of building, programming and designing during VandyHacks in the Spring of 2015.
Using an arduino, three servo motors, a bluetooth module, rulers, tape, superglue, string and a single pocketknife, we made two tracks - one for the x-axis and one for the y-axis. The servo motors would pull the pieces of wood up or down the y-axis and to the right on the x-axis based on the equation, and a pen trapped between the two pieces of wood would draw the desired graph. This process could be done because servo motors can be turned to a desired degree between 0 and 179. Therefore, we would change the servo pulling along the x-axis by 1 and map the correct value to change the servos pulling for the y-axis. In order to be able to draw as many equations as possible, we gave the device the functionailty to pull up or down in the y-direction (for parabolas, etc.). These servos were powered by an arduino and told what to do based on data recieved by the arduino via a bluetooth module.
The software was written for Android and Arduino. The Android app created allowed the user to input an equation and hit "Search Graph". Upon searching for the graph, the device would make a call to the Wolfram Alpha API and pull down various data about the equation including a picture of the graph, the integral of the equation and the derivative of the equation. On this second screen, there is a graph button. When the user pressed this button, the android device communicates with the JY-MCU bluetooth module and tells the arduino various points on the graph. The arduino code maps these points to servo values and then moves the servos causing the interesection of the wooden pieces controlled by the servo (where the pen is held) to move in the shape of the graph.
This project was designed and constructed during VandyHacks in the Spring of 2015 and ultimately recieved second place overall in the competition. The project can be viewed on ChallengePost at http://challengepost.com/software/robo-grapher