--This is not an instructional guide... yet! The developers are working on updating it so check back soon!--
The stock market. An interesting, complex, and sometimes confusing beast, is often best understood with a fun visual model. This project will track the price/share of the Boeing stock, and relay that information not only on a digital screen, but also through the movement of a flying plane that flys up and down based on the price, and whos windows change color based on the percent increase/decrease!
A webhook was used to pull the stock into the photon. After multiple attempts to secure the plane to a mechanism to raise it up and down, we decided to just use the fishing line attached to the wheel of the motor. The wheel was something we found that had the right sized hole for the shaft of the stepper but if you want to replicate the project you will probably have to 3D-print one. There is also a piece of supportive fishing line going through the front and back of the plane to keep the plane in place. A stepper motor cannot tell how its shaft is positioned. It can only be controlled by the number of steps in either direction. That is why we used a limit switch at the bottom and a start-up procedure. When the photon connects to the internet the stepper will lower the plane until it triggers the limit switch. The stepper will then bring the plane up to the middle of the range so it reliably starts in one place. There is a price range you should use depending on how much you want the plane to move per price change. We used a plus or minus $1.50 and got good results. The webhook will then feed the photon stock prices and the photon tells the stepper how many steps to take in either direction. The Boeing stock price is displayed on the liquid crystal display(LCD) screen. The stock price also tells the LED strip inside the plane to be green(increase), red(decrease), or white(no change). If the stock ever lowers the plane enough that it is out of the price range the stepper will bring the plane back to the middle of the box and the price range will reset.
We finished the project and here is a time-lapse of the final project: