Raspberry Pi's are small, inexpensive computers that runs Raspbian, a Debian-based OS. It operates with a micro SD card and a USB-C charger. I used my mobile charger, but it can also be plugged into an outlet. Raspberry Pi's have 40 pins; 24 are GPIO. Although you can plug in a keyboard, mouse, and HDMI wire, this project utilized VNC and SSH so that the Pi could be controlled from my device. With the VNC, I was able to create programs on the Pi even though things were typed on a separate keyboard.
Instead of using a chassis that was offered (and I am now regretting), I decided to make my own chassis and turning mechanism. I made a chassis on OnShape and scaled the crucial bits down to 1/4 their actual dimensions. With that in mind, I cut out the rough shape in cardboard. I wasn't sure if I had the LEGOs I needed to make it. I mostly had the LEGOs, so I decided to make the new chassis out of that. LEGOs are notoriously weak against constant movement. There were many times that pieces would pop out, so I superglued them down. It was a trip. 2/10, would not recommend. Just take the chassis from Dave.
The rear axle used a gear train to amplify torque. Blue has 40 teeth and is connected directly to the motor. Red has 20 teeth and is connected to the axle. The 2:1 ratio meant that red rotates twice as often as blue
Turning used a servo and a rack and pinion gear train. Since the servo rotates to an angle, it runs the rack across the pinion and causes the Lego frame to shift at the pins.
The Pi had enough power to support the servo, but not the gearbox motor. To control the gearbox, a motor driver was used to direct power via batteries to the motor while controlling the direction via Pi command
I developed most of the code in Python, with two pieces being open-source. Modules that aren't available on desktop are available on the Pi, and all code can be found on my GitHub: SaberGameDev.