Our group is trying to collect data on how long students are gone from class and for what reasons. The classroom that we deployed our box in hosts three different classes: AP Physics A, Honors Robotics 1, and Honors Robotics 2. We thought it would be interesting to see if there was a correlation between the perceived difficulty of the class, how often students leave the classroom, and how long they're gone for.
During our brainstorming session, we figured that the four reasons students most often leave class for are: to go to the bathroom, get water, get something from their locker, or go on an errand for a teacher. From this point, we decided we would make a box that had a switch for each of those reasons. If a student were to leave the class, they would press the switch on, and when they came back they would turn it off. The photon would keep track of which switch they pressed, so that we know why they were gone, and we would know how long they're gone for.
The very first thing we did was look up wiring diagrams online so we could have a plan by the time our switches came in from SparkFun. We found two basic switch diagrams, and after a couple of test runs with a simple button, we figured out which one would work the best.
Once we got our switches, we wired them up with the photon and breadboard according to the diagram we found online. We then measured out the length of the wires, and the width and length of the breadboard in order to figure out the dimensions of our box. We created a sketch, and proceeded to build a cardboard prototype with the same dimensions.
Going forward, we split up some tasks amongst ourselves to be more efficient. One person worked on programming, another on creating an Adobe Illustrator file, and the third finalizing the wiring.
The most tedious task by far was the programming. We couldn't test out whether or not our wiring was correct until the program was written and worked correctly. It took us about two weeks to have our code finalized and tested.
There were a lot of things that we had trouble with, but we overcame obstacles by working in small steps. In the beginning, we worked on the code for one switch, and once that worked to perfection, we copied and pasted our algorithms and tweaked small things like variable names so that it could work with all four switches.
The very first thing we did was make a counter, so we could keep track of how many times students used each switch; that was the easy part. Going from there, we needed to find how long a student was gone for. Ultimately, we created variables that kept track of the minutes and seconds on the photon's onboard clock. We have variables that are set to the current minutes and seconds every time a switch was turned on and off. Through a series of algorithms, we were able to find the duration of a student's absence.
Overall, the programming part of this project involved a lot of trial-and-error. If we thought we had a program that worked, we would hookup a switch and test it. Then, we would uncover a problem and fix it. This process was repeated over the span of a week, until our code worked the way we wanted it to.
Once we confirmed that our switches worked properly, we proceeded to cut out our enclosure out of birch wood and used t-slots to secure all the sides together. We then deployed our enclosure in the aforementioned classroom.
After we deployed, we started to gather data from students; although, it wasn't as much as we hoped for. This project is ideal to study trends over a period of a school year, but you can't get much data from one week of deployment. Nonetheless, we gathered our data and created visualizations
Overall, this project was extremely beneficial to us as students. We were able to complete a final data collection product in eight weeks by ourselves. We, the students, were in charge throughout the whole process. Apart from the technical skills that we learned like using a laser cutter, programming, and wiring, we all learned how to work together as a team.