March 10, 2025
- Am working through how to code up the Bop It! game and have learned some things.
First, some of the libraries that I rely on will need to be uploaded to the Pico
device. This can be done with the MicroPico extension I installed last week, but
it’s not enough to just click “run” on the program, the whole project needs to
be uploaded first. Libraries can be copied directly into the project. For the
accelerometer device I have, I am using this repo.
- Things I’ve stolen from the kit that I should replace:
- The joystick
- Male-to-female jumper cables
- MPU6050 with pinout
- Slide switch
- LCD 1602 with an I2C connection
- I figured out some game logic so that I could measure input from the slide
potentiometer, the joystick, and the accelerometer. The game can prompt in the
console that it wants the user to Slide, Shake, Flick, or Touch it, and it mostly
works. The next steps are a bit harder:
- Figure out how to hook up the speaker, which might be tough since the speaker
ideally would be hooked up to the Analog input, but that’s already being taken
by the potentiometer and the joystick. I need to figure out a converter.
- Figure out how to power the game with a battery
- Figure out the mechanics for turning the game off and on. I think I might
do this last.
I also paired a bit on the thesaurle project! We found that our logic wasn’t great
so we spent some time to refactor the code to:
- Use the dictionary / TSV that I had generated instead of calling the API on the fly
- Remove the hard coded prompt and instead choose a random word
- Clean up some of the janky logic that we only needed due to the unreliable data
source.
Up next, we want to work through the game ergonomics and make sure the path that
it prompts the user for isn’t a circular path.