Microbit Project: Basketball score counter
userhead
Ash 2019-12-23 08:30:11
projectImage
*Created by Mark Ng
HARDWARE LIST
1x
IR sensor
1x
micro:bit
1x
micro:mate(breakout board)
1x
Gravity: Digital Speaker Module
1x
Dupont cables
1x
Basketball hoop
2x
M4 20mm screws with nuts for mounting micro:bit
projectImage

How does it work?

Distance adjustment 

**Counterclockwise 

decreases distance

 **Clockwise increases distance 


 When this IR detects an obstacle within range it will send an output low. 

Move your hand towards the IR LEDs. As you move near them, the IR receiver detects blockage and the obstacle LED will be lighted up.

 We are making a basketball score counter. When the loop detects a ball passing through, one count will be added to the score and a melody will be played. 

If you want to reset the score, press button A

Connections


IR sensor Micro: mate 

GND Pin 1 Black 

VCC Pin 8 Red(5V) 

OUT Pin 1 Blue 


Digital Speaker 

Black Pin 0 Black 

Red Pin 0 Red 

Green Pin 0 Blue

projectImage

1. I used scraped acrylic and secured it using 2 screws and nuts and drilled 2 5mm holes. 

2. Adjust the distance and test the range. Bend the ir at 90 degrees. 

3. Slot the IR into the 2 holes (side view). 

4. The back view of the IR sensor.

projectImage

The M4 screws are used to replace the existing screws used in the micro: mate. As the screws are longer, we can mount the micro: bit and micro: mate onto the board.

The code

projectImage

Even though the specifications state that it can operate from 3v to 5v, you will find that the 3v from the micro: bit will not be able to drive this IR sensor.

After programming, remember to connect the micro USB connector to Vin of the micro: mate and switch the selector switch to 5V.

License
1
All Rights
Reserved
[[i.text]]
licensBg
0
0
COMMENTS ([[commentTotla]])
[[c.user_name]] [[c.create_time]]
[[c.parent_comment.count]]
[[c.comment_content]]
userhead
Ash
Joined 2019-10-20
M-point M-point 2336
Makelogs Makelogs 12
Affiliate
Related Products
X[[p.num]] [[p.name]]