Introduction: Basketball Hoop Shooter With Grove Zero Modules

About: TEACH | FUN | EDU ✂️ STEM made SIMPLE ⚙️ enabling kids to get to the fun bits of 🛠️ tinkering ➕ creating🎨!

In this article we're going to build a miniature basketball hoop game, which will automatically count the points for getting the ball through the hoop. To do that we will use TinkerGen Grove Zero - a line of programmable electronic building blocks that combine easy magnetic connections with graphical programming software to implement functional and basic designs. Grove Zero is a great tool both for developing a child’s creativity and for teaching STEM concepts.


Grove Zero Starter Kit V2.0 (modules Mech Key×1、Main Board×1、Battery×1、4-Digit Display×1)

Rivet ×2
Nylon cord ×1(at least 250cm long)

G0 modules×4(

Cardboard(150×450mm、2mm thick、cardboard drawing PDF available for download)

Step 1: Prepare the Materials and Cut the Curdboard

Start by taking the modules out of Grove Zero Starter Kit and having a good look at them.This kit includes 9 Grove zero modules and is designed for kids who are beginners to graphical programming and robotics. Among these modules, the light sensor, sound sensor, and twin-button module are what we call input modules; while the buzzer, RGB LED, LED matrix and servo are categorized as output modules. By connecting one or more modules to the included mainboard and battery module, you can implement a lot of your exciting and fun projects!

The modules we're going to use for today's project:

Mech Key×1

Main Board×1


4-Digit Display×1

Next, cut the cardboard according to the designs you can find in the .pdf file.

Step 2: Assembly

Follow the step-by-step picture guide on how to assemble the structure:

Build the base of basket

Build the G0 modules slot and fix the base

Build the basket and the hoop

Assemble the basket ball

Assemble our G0 modules

Plug the basketball hoop into the base

Step 3: Coding and Testing

For coding we will use TinkerGen's graphical programming environment, Codecraft - it is free to use and based on popular Scratch 3.0 open-source graphical programming environment. Needless to say, if you have used Scratch before, you'll get used to Codecraft very fast.

Open Codecarft in your web-browser at

Click on Create Online to start a new project. Our code logic mainly consists of three parts - the main loop where we set our score to 0 in the beginning and whenever we reach the highest possible score(9999 - since 4-digit display only has - you guessed it - 4 digits). In when 1 Mech Key clicked block we have the scoring logic - every time Mech Key is clicked we add 100 to our score. And inside when 1 Mech Key clicked block we have the logic for when no interaction happens.

You can download the finished code from here and open it in Codecarft, if you experience any difficulties.

Step 4: Make It Your Own

We finished our small project, but the making doesn't stop here - you can use more modules for example the buzzer or LED matrix to make it even more fun. And don't forget to customize your basketball hoop game with the logo of your favorite basketball team ;)

If you decide to make and customize your project, do share in the comments below. For more information on Grove Zero series, Codecraft and other hardware for makers and STEM educators, visit our website, and subscribe to our newsletter!