This week was mostly focused on the logic of the puzzle, conditions, serial communication (thanks to Scott!), the web interface, and visualizing components.
Ideating:
Progress:
In this video, I was able to get a fixed preset sequence working via an array and implement a number of tries.
In the next video, I was able to get p5 to communicate with the arduino. I realized that my conditions caused that if the 1st and last numbers are the same, it allows the unlock code to run right after the first button is pressed. (fixed it though)
After doing so, I fixed my p5 sketch to have the auto and manual features and modified the code where it communicates with the arduino.
After troubleshooting galore, I updated the p5 sketch to include both features (auto and manual) and communicate the sequence of numbers and the number of tries. It also resets the arduino (on arduino side) whenever new data is sent. I added the motor to unlock the box (eventually) and have it be kept unlocked until a separate button is triggered (that signifies the closing of the box — the box will be built to hit the button upon close + will fix the code given that).
The next week will be spent building the container for it (via cardboard, glue gun, sautering, etc).
If there is additional time (or after school is over), I would want to get it working via remote access and control (maybe through IFTT – even if just to override the need for sequence input).
*Max number of tries is still at 7, no infinite version has been made yet (even if p5 says inf– it’s actually. . .7)
Leave a Reply