As a refresher from last school year, we coded LED lights to blink one at a time. This resembled that of the pattern of a stop light. I think it was a good reminder and warm up for the year.
We upgraded our previous LED stop light practice by creating the same concept but with a breakout board. We did this to prepare us for the creation of our pinball machines, as we will likely be seeing a lot more of this breakout board.
We coded our board so that the individual lights on the board itself chased each other in a circular pattern. There were 28 lights total, and much of the code was repetitive. We used the coding software Mu to do so. I also saved my code to Github so that I can always go back to it for references. We also used the serial monitor to troubleshoot our code and check for any errors.
The Launcher is a mechanical component on all pinball machines. The ball return places the ball in the launch lane in front of the launcher. A launcher is a lever like piece that the player pulls towards them and releases. Once the player releases the launcher it hits the metal ball harshly and makes it shoot onto the game play area of the machine. Then you start playing!
My video shows the metal ball being shot around by numerous bumpers. When the ball rolls underneath the bumper, it activates a solenoid, which then triggers a mechanism at the top of the bumper to clamp down. This shoots the ball back into the board at random. Bumpers make the game more challenging and complex. Bumpers also tend to light up when activated and sometimes can even make sound effects.
The video shows targets in the form of LEDs. Instead of the typical flaps, the machine senses when the ball goes over one of the lights that make up the word 'prison'. Once all letters are activated and lit up, it opens the doors to the shelter. If you manage to get the ball into the doors, then you get extra points. The purpose of these targets is to boost your score and provide you with an opportunity for more points. I believe they work using motion senors or touch activated triggers.
The start button is common among all the pinball machines we observed. It is a vital mechanical component that allows the game play to begin. It works by depositing the metal ball into the ball return after you press the button. It is specifically put into the launch lane from the trough. This action is swift and then you are able to use the plunger to begin playing. Without the start button you would not have access to a ball to be able to play.
Today we programmed our scoreboards to display text. The theme for my team's pinball machines is 'Plants VS Zombies', so we made that the displayed text. It also shows the score and any score updates. We again used Mu as our coding platform. I also made sure to upload my code to Github as a way of storing it.
Today in class we completed the task of making our score board display a response to two different buttons. We used Mu to code one button for 'ball_count', and the other for 'score'. The ball count starts at three then proceeds to decrease when the correlating button is pressed. The score increases every time the correlating button is pressed. I also included the code in GitHub for reference purposes. In addition to GitHub, we also created a wire chart for extra organization!
Third Button : We incorporated an element of our own via adding an additional button variable. The third button is for bonus points if the player hits a certain object.
On August 23rd we did our first OnShape drawing practice. We used the rectangle tools (center and corner drag) to create this sketch.
On August 28th we made our second sketch, also using rectangle tools. We also used the dimension tool a lot.
Using the linear pattern tool on OnShape, we created a repetitive pattern very quickly within a larger rectangle.
We used OnShape to make our score board mount. We used basic tools such as the rectangle, line, and mirror tools. This is a draft, as the final mount will be wood.
Using OnShape we made a staircase-like 3D model. We utilized the extrude tool many times to get this desired effect.
This video is very useful because it shows every part of the bumper working in real time. It gives me an idea of exactly how I want my bumper to function once I am done. It provides me with an understanding of my goals.
This video is very simple but also very educational. It shows an animated version of bumper mechanisms being activated. This gives me a prespective that is vital to understanding funcion.
This video showed me a more in depth process of how the bumper works in correlation to the rest of the pinball machine. That is very useful because I want my pinball machine to flow smoothly as one complete game, not a bunch of seperate parts.
Bumpers
Functionality: Detect when the ball hits them.
Description: Three bumpers are used, connected to GPIO pins 14, 27, and 32. When hit, they register a change in state, contributing to the score and triggering visual feedback.
Targets
Functionality: Detect when the ball hits them.
Description: Three targets are used, connected to GPIO pins 33, 25, and 26. When hit, they add points to the score and trigger visual feedback.
Flippers
Functionality: Control the movement of the flippers.
Description: Two flippers are controlled via GPIO pins 12 and 13. They are activated and deactivated to hit the ball.
Launcher
Functionality: Launch the ball into play.
Description: The launcher, connected to GPIO pin 23, launches the ball into play when activated.
Neopixels
Functionality: Provide visual feedback.
Description: Neopixels are used to create visual effects, enhancing the gameplay experience. They are updated based on events such as hitting bumpers or targets.
Scoreboard
Functionality: Keep track of the score.
Description: The scoreboard increments and displays the player's score based on interactions with bumpers and targets.
Servo
Functionality: Move mechanical parts.
Description: The servo is used to control a specific mechanical movement within the pinball machine, adding to the dynamic gameplay.
Designing the layout and aesthetic of a pinball machine involves a blend of artistic creativity, engineering precision, and an understanding of player psychology. Here's a detailed breakdown of the thought process behind it:
Theme: Plants V Zombies
Colors: yellow, green, blue
Ball guides: directional and aesthetic
Placement is key to an organized set up.
Good wiring practices are essential for several reasons:
Safety: Proper wiring prevents electrical hazards such as short circuits, fires, and electric shocks, protecting both users and equipment.
Maintenance: Neat and labeled wiring makes troubleshooting, repairs, and upgrades easier and quicker, saving time and reducing errors.
Efficiency: Efficient wiring minimizes power loss and ensures optimal performance of electrical systems and devices.