hardware
2025-02-20
- Getting set up with badger following the tutorial
- Installed thonny IDE for hacking on the badger – benefits: built in IDE so it’s easy to deploy code to the device (this will come in handy for future work with Raspberry Pi Pico)
- Tried to use the badger but it didn’t work and I got frustrated. Clicking two buttons was supposed to work, but it didn’t
- Created a hardware inventory for all the various pieces I have
2025-02-22
My new Sunfounder (with Raspberry Pi Pico) hardware kit arrived and I started working through the tutorial
- The first thing was plugging in the raspberry pi pico w and dragging the OS to it, which seems sort of unnecessary?
- Open up thonny (luckily already installed)
- Reminder: GPIO means “General Purpose Input Output”
myLED.value(1)
time.sleep(2)
myLED.value(0)
time.sleep(2)
myLED.value(1)
is equivalent to myLED.on()
2025-02-23
- The aerialometer has a microprossor and it’s running some code that can be deployed via an .ino file. Need to plug an FTDI connector to the device to be able to deploy new code. The FTDI device can also be used for debugging. I ordered this one on Amazon to get set up here.
- The compute on the device is running the program and also has a flash storage (it’s the same as any other arduino file)
- The code itself relies that the gyrometer and the accelerometer can sample on a continuous rate. Data is sampled and written to the flash memory. The device accepts an interrupt from the processor which acts in a blocking manner and writes the data from the flash to the SD card. There’s a fixed sampling rate for the hardware so there are no gaps in data.
- To operate the device, it’s good to refresh memory on what the various flashing modes mean, as they indicate a number of states. Roughly, to operate:
- Turn on the switch on the back of the device. This will start up the device and get it ready to go.
- Tap the device (hard!) to begin sampling data.
- Tap again to stop device collection. This should kick off the data transfer to the SD card.
- When turning off, the data will continue to write to the SD card (if not already complete)
- Once data collection is done, the device will finally switch off and lights will stop flashing.
- There is some funkiness with the SD card currently. My mac won’t recognize it. Current theories are that the device is corrupting the cards, or that the card is too big, or not formatted correctly. Next up, need to debug. Also ordered some 128 MB (MB! not GB!!!!) SD cards so they can be formatted with FAT, not FAT32. Cards can be formatted using the Disk Utility app on Mac (don’t need to install a separate program).
- Connect an LED and flash it on and off. Make sure to connect resistor to the short pin end of the LED so that the LED doesn’t smoke out.
- Reminder that any of the pins labeled “GP” on the pinout can be used as GPIO, so select one that is convenient. The device has many grounds, too.
- When referring to the pin in code, need to use the GP number, not the Pin number (Pin 20 is GP Pin 15, so need to use 15 in the code).
2025-02-27
Today I was working through some hardware things! I wanted to play with the neopixel
LED strip, and also play with using buttons to control the lights on the strip.
First, I played with displaying lights on the strip, and then reading input
from a button to trigger a light loop on the strip. This ended up being pretty
easy. One thing we learned was that the buttons I have are pull up buttons -
when pressed, their state is 0, and they need to be connected to ground (rather
than powered).
Once I got the single button working, I hooked up 4 buttons total to be able to
play a simplified simon says game. The game displays a random pattern of the
four colors, and the player has to remember the pattern and attempt to input it
correctly. The user never currently loses the game, they would basically essentially
win if attempting to click all buttons for each turn. That’s a future optimization.
The user also can’t restart the game, so that’s what I want to enhance, too. This
game play might also be more interesting for a series of LEDs (in a particular position)
that the user should click to match the pattern, but again, that’s a future
optimization. Having a button to start / stop game play would also be cool.
2025-03-06
Today, I’m learning a bit about how to plan for and design hardware projects.
I am going through some tutorials on how to use the Fritzing software to design
breadboards and schematics. A few notes:
- Not all parts will be available in the software, but the community may have designed fritzing files for the parts I need. For example, Raspberry Pi has Fritzing designs for all its parts, so I was able to google for the fritizng part and download it. From there, it can just be imported into the software for use.
- I designed a breadboard design for the Simon Says game so it will be easier to reproduce in the future!
- I also researched how to use VS Code as my main driver for these Rasbperry Pi projects, because using the thonny editor has been giving me a bit of a hard time. I found the official Raspberry Pi Pico VS Code extension which seems amazing. This has hooks to be able to connect directly to the Pico and run the code from the editor, so I don’t need to fight with Thonny anymore! Main thing of note: Seems like project folders need a
.micropico
file to signal that they are indeed pico projects, and that should hook up all the thing that are needed to trigger the extension to start.
- This might be a helpful reference for future projects, but it was a bit overkill for my immediate needs which was just “how do I get this extension to run code on the device”. Lots of details about how to use the extension including the debugging interface, which I’m sure I’ll need at some point. :)
2025-03-11
Taking a crash course on YouTube on soldering
and some lessons include:
- Get stranded core wire, which is easier to work with. Then tin the wire (solder
the ends together) so it’s easier to work with. Can also connect two wires together.
- To attach a wire to a pin board, first fill the hole with solder, and then slide
the wire in and solder it.
2025-03-13
Today was again a very Bop It! focused day. Some folks and I went on a field trip
to MicroCenter in Brooklyn to check out what they
had. I picked up some hardware goodies, including a replacement joystick and LCD screen,
as well as a fun pimoroni screen that I don’t have plans for yet but might inspire
something in the future. I also picked up some replacement 3d printer filament
since we’ve been doing a lot of 3d printing this week at RC!
2025-03-20
I also wanted to get the pimoroni display pack set up to start playing with it
a bit. This was slightly less straight forward than I expected at first because
I had to flash the new device I got. And stupidly, I bought a Pico 2 W this time
instead of a regular Pico, so the recommended firmware is a bit different. NBD,
but I think going forward I should try to stick with one device type so I can have
a consistent process. The device now has this release flashed onto the drive.