Robot Mini Golf
2 hours
Ages 7-13
What Will You Make?
Make an interactive mini-golf obstacle the reacts when a light sensor is tripped.
What Will You Learn?
Participants will learn the basics of coding position and rotation motors using Makecode. They will also learn to use a light sensor.
Design an Obstacle
The Challenge
Design an obstacle that “celebrates’ when someone gets the ball in the hole!
Suggested Criteria (Things your robot must do)
- Must include at least 1 light, 1 motor, 1 light sensor.
- Getting the ball in the hole should trigger a sequence of events to celebrate.
Suggested Constraints (Limits on your project)
- Size limit suggestion: Shoe box
Prototype
Draw or make a prototype – a rough first draft – of your design. Start with a non-moving prototype. Then consider where motors, sensors, and other electronic components can be added. Use the Engineering Design Process and Prototyping Cards to guide the process.
Point an LED at a Sensor
Build a Half Cup Golf Hole Hack
To create the hole or the pass-through for a golf ball in your obstacle, cut a paper cup in half. Leave the bottom on if you want the ball to stop, or cut the bottom off if you want the ball to pass through.
Add LED and Sensor
To add the LED and the sensor to the cup, use a blade to make 2 X-shaped cuts on opposite sides of the cup. Insert the LED and sensor wires first through the hole so that they face each other. Use tape to secure them in position. Plug them into the Hummingbird.
Program LED and Sesnor
A light sensor is a component that collects data based on how much light surrounds the sensor. The range of the light sensor is 0 to 100.
Use the video tutorials to learn to program using the light sensor, as needed.
Read the Sensor Data
Shine the LED at the sensor. Gather the data – either display the sensor data on the micro:bit LED array or your tablet display. See this example code in MakeCode.
Note how the sensor data changes if you block the light from reaching the sensor. You will use this data to determine your threshold, or cut off point.
Trigger a Motor
Move a Motor
Make a motor move when the sensor data crosses a threshold.
Use the video tutorials to learn to program using the rotation servos or position servos, as needed.
Trigger a Motor
Program a conditional statement to use the light sensor’s data to trigger the motor to move and stop.
Check out this example code in MakeCode.
What Is Happening Here?
Sensors and Triggers
In this project, we trigger actions from the tri-color LEDs and motors when the sensors gather input. There are many types of input and output possible with our micro:bit and sensors.
The Sense-Think-Act Board is a great way to demonstrate the Hummingbird Robotics Kit and what makes a robot. These instructions will help you to create your own Sense-Think-Act Board.
About CodeJoy Education
CodeJoy (Kelsey Derringer and Matt Chilbert) created a live webinar studio that captures the essence of what it means to learn in a classroom. They combine multiple cameras, studio-quality video production, and thoughtful teaching to create an authentic classroom experience that you can join from anywhere. Think of a CodeJoy class as a live, fully- interactive TV show. CodeJoy uses humor, special effects, and narrative storytelling to engage and educate students about robotics and coding – allowing students to control REAL robots in REAL time during the session. Classes can serve large or small audiences, from a single classroom to an entire district!
Materials:
- STRUCTURAL
- Cardboard
- Paper Cups
- Craft sticks
- TP tubes
- Plastic cutlery
- Recyclable materials
- TOOLS
- Box cutter
- Scissors
- Tape
- Hot glue
- DECORATION
- Permanent markers
- Pipe cleaners
- Feathers
- Googly eyes
- Art supplies
Suggested Technology:
- Hummingbird Robotics Kit - Find out more HERE.
- Computer, Chromebook, iPad, or tablet for programming
Additional Resources: