How to make a basketball counter with micro:bit?

How to make a basketball counter with micro:bit?

Hi, this week I’m planning to show you with a case of building a simple micro:bit basketball counter. It is able to help us to count the times of throwing a basketball into the hoops.

"Hi, do you like basketball?" In 1993, a cartoon about basketball Slam Dunk was launched, and it instantly spread across the whole of China. It left an indelible mark in the hearts of all teenagers who love basketball. The trace has become the memory of a generation of youth and passion, and it is also an immortal masterpiece in the hearts of countless people. Youth, passion, hard-work, "Slam Dunk" gives us too much positive energy. He seems to be a genius born for basketball-Sakuragi Flower Road. The physical strength that can never be used up, and the spirit of never admitting defeat, let how many people choose to change or change their jersey number to number 10.

Let’s start building it now, firstly please prepare the materials we need as the picture shows:

Now build a baseboard with four frames as the picture indicates:

Here let’s build the “pillar” for the basketball hoops:

Next let’s build with the counting times part, it requires the sonar:bit. Fix sonar:bit to the bricks with the screws and have them connected to the “pillar”.

Now let’s build the loop part with the bricks in below pictures:

Finally connect it to the baseboard and connect the sonar:bit to P10 port on Wukong expansion board.

Download the program to the micro:bit and here we go with the finished



If you have any new ideas, please feel free to contact us via, thank you!