Case 07: The Basketball Counter
9. Case 07: The Basketball Counter#
To make a basketball counter.
9.3. Materials Required#
Video link: https://youtu.be/0P88GP4RQaw
9.4. Bricks build-up#
9.5. Installation Mthods of Hardwares#
Install the sonar:bit with the bricks.
9.6. Hardware Connection#
9.7. Software Platform#
Click “Advanced” in the MakeCode to see more choices.
Search with Wukong in the dialogue box to download it.
Search with https://github.com/elecfreaks/pxt-sonarbit in the dialogue box to add the sonar:bit extension.
When the ultrasonic sensor detects the ball goes through the basket, it will be counted, and the value will be displayed on the micro:bit. (The principle of ultrasonic counting in this case requires to be tested according to the actual construction of the basket, it is the detection of ultrasonic sensors to the ball basket with the fixed distance value, and by judging this fixed distance value, the score plus one, so as to achieve the purpose of counting. (Ultrasonic sensor counting may have deviations, inaccurate, belonging to the normal situation of not detecting the small ball.