[Educational Time Machine EP4] Martial Arts Battle in the Programming World - S4A x Double Pinball Machine
In [Educational Time Machine EP3], we introduced the rise of programming education and the basic application of S4A. Have you experienced the sense of accomplishment of programming in that episode?
Kids are typically thrilled to feel accomplished when taking on new challenges, and programming courses provide both intellectual and experimental learning opportunities. However, debugging can be frustrating at times. As the Chinese proverb goes, "It's better to have fun with friends than alone." If programming seems dull, why not invite some friends to join in and create this "Double Pinball Machine" model together!
A pinball machine typically comprises a rectangular wooden frame where players insert coins and use springs to launch metal balls. The balls then bounce off iron nails and players earn points based on the places they hit. Players can control two flippers to keep the ball bouncing and score more points.
Old-fashioned pinball machines were limited to single-player use with the machine. But now, thanks to Gigo #1204RR - S4A PROGRAMMING BLOCKS, we can have fun playing pinball with a friend on a double-player machine.
◆Preparation (5 minutes)
1. First, we'll introduce the functions of the S4A software to the learners. We highly recommend installing and testing the software before class to ensure that all computers are functioning properly.
2. Let's gather all the necessary parts for the model, and prepare two C-Gigo MAKER CONTROL BOX for two players.
◆Demonstration of model making (20 minutes)
You can follow the assembly steps to build the model.
Step 1: Combine four C-5X10 FRAME and one C-5X13 DUAL FRAME as shown in the figure.
Step 2: Insert some B-LONG PEG into two C-5X5 FRAME, and combine with the part of step 1 as shown in the figure.
Step 3: Repeat the step 1 and the step 2 to make two set of frames as shown.
Step 4: Insert B-LONG PEG into two C-5X15 FRAME, and combine with the part of step 3.
Step 5: Adjust the C-180° SERVO MOTOR to the 90-degree position, and combine it with the C-11 HOLE ROD to make the two flippers on the left side, as shown in the figure.
* Be sure to confirm the angle of the C-180° SERVO MOTOR and the correct holes of the C-11 HOLE ROD to make it working! Do not manually turn the C-180° SERVO MOTORto avoid damage to the motor.
Step 6: Adjust the C-180° SERVO MOTOR to the 90-degree position, and combine it with the C-11 HOLE ROD to make the two flippers on the right side, as shown in the figure.
* Be sure to confirm the angle of the C-180° SERVO MOTOR and the correct holes of the C-11 HOLE ROD to make it working! Do not manually turn the C-180° SERVO MOTORto avoid damage to the motor.
Step 7: Install the flippers at the four corners and place it in the third hole of the C-5X10 FRAME as shown below.
Step 8: Place two C-Gigo MAKER CONTROL BOX. Connect the left flippers to D7, and Connect the left flippers to D4.
Step 9: We can add various obstacles onto the frame to make the ball not stuck in the corners.
Step 10: Open the S4A software and write the program.
Program logic:
When the right button is pressed, the C-180° SERVO MOTOR (motor 4) on the right will rotate to 160 degrees, wait for 0.5 seconds and then return to 65 degrees, so that we can play the table tennis..
And when the left button is pressed, the C-180° SERVO MOTOR (motor 7) on the left will rotate to 20 degrees, wait for 0.5 seconds, and then return to 115 degrees.
The 0.5-second buffer time and angle in the above two commands can be adjusted by yourself, but please pay attention to whether the C-11 HOLE ROD is squeezed into the frame to avoid damage to the servo motor when adjusting..
When the space key is pressed, the C-180° SERVO MOTOR on the left and right sides will return to the initial angle and stop. This step is to ensure that all programs can be stopped to protect the motor from excessive operation.
◆Production and Play (25 minutes)
1. Students assemble the two-person pinball machine model by themselves, and the teacher can provide assistance in due course.
2. Students who have completed the model can then start playing, and they can adjust the buffer time in the program or modify the model to increase the variability.
◆Summary and Tidy up (10 minutes)
1. At the end of the course, teachers can give a summary that includes an explanation of the collision principle and operational tips. They can also go over some types of pinball machines, like the video game version, or the rubber band version.
2. Ask the students to take apart the models, sort the pieces, and put them back in their proper places. Remind them to use a peg remover to take the parts apart instead of forcing them.
◆Scientific Principles
This model employs one scientific principle: " Newton's cradle(Collision principle) ."
When multiple entities come into contact within a brief timeframe, we refer to it as a "collision". In the field of mechanics, the application of force onto a particle results in alterations to its velocity, momentum, or energy.
The C-11 HOLE ROD is utilized to create a "collision" with the table tennis ball, generating a significant amount of force that propels the ball back in the opposite direction at an accelerated velocity. This results in an exciting and engaging competitive experience, as the opponent aims to return the ball with their own skill and precision.
◆Postscript
Each person's creation is distinctive, and even if they use the same program, there will be variances when applied to diverse projects. During programming education, collaborating and discussing with peers can lead to greater efficiency and a more enjoyable team experience.
As of now, the educational time machine has concluded the S4A software introduction, and we eagerly anticipate embarking on our next adventure together.
Keywords:
Coding Education, Scratch, S4A, Arduino, Collision, Pinball Machine, Double Pinball Machine
Curriculum:
3-PS2-1 Plan and conduct an investigation to provide evidence of the effects of balanced and unbalanced forces on the motion of an object.
3-5-ETS1-1 Define a simple design problem reflecting a need or a want that includes specified criteria for success and constraints on materials, time, or cost.
3-5-ETS1-2 Generate and compare multiple possible solutions to a problem based on how well each is likely to meet the criteria and constraints of the problem.
Please sign in to vote.