Week 30. April 1.5 2019 - michelle-qin/Portfolio GitHub Wiki
*note: I was out of town from April 3-5 so this portfolio only includes the work of April 1-2.
Last week, I was working on another project for the Ball Wall: the Archimedes staircase. My task was to program the staircase to sense a metal ball at the base of the cylinder and then turn on the staircase to bring the ball to the top of the cylinder where it would exit and the staircase would turn off. I worked with Mr. Miller to understand how to code it, as there were some things such as the pulselength that we needed to be precise.
I did notice one little issue which is that sometimes it takes the sensor a longer time to detect the ball than expected. Sometimes, the ball will quickly pass by the sensor and enter the cylinder without enough time for the sensor to detect it. This could be a potential issue.
Some new methods of debugging that I learned: From the example code on adafruit, we knew that there was a range for the pulselength of 150 to 600. Running the staircase across this range produced a variety of speeds. So, to check which exact ranges were producing what speeds, we created 3 different for loops that ran across different ranges (e.g. 150 - 300, 300 - 400, 400 - 600) and used a serial print line for each loop (e.g. "Phase A", "Phase B", "Phase C") to track each range. By doing this, we found that around pulselength 330-340 was the "neutral period" (the staircase would stop moving) and the ranges before and after that neutral period moved the staircase in a different direction.
images/Archimedes Staircase.JPG A photo of the Archimedes Staircase in action (do you see the metal ball?)
I cleaned up the code, added comments, and pushed it to GitHub.
Next Steps: I will continue working on the Ball Wall, but I was told yesterday that some things have shifted with the project. While the Ball Wall team would still like to include interactive components such as the Archimedes Staircase and Ball Rotation, the team has recently updated the design of the wall to include new components, such as a gutter and a pulley, that can bring the balls to different stations. This new design requires software written up for it so I will be focusing on that in the near future, and get back to working on different interactive components afterwards. Thus, I will now be working on the Arduino board instead of the Featherwing board.