![basketball hoop but plug basketball hoop but plug](https://manasah.azureedge.net/pictures/0177503_adjustable-basketball-hoop-and-support-set-for-kids.jpeg)
Under this will be 3 LEDs displaying which round of 3 is currently being played. There will be a larger alphanumeric display at the top middle of the board to act as a countdown timer. Scope of the game is 2 players, 3, 30 second rounds, person with the highest total score after all 3 rounds is the winner. General concept is a more true-to-life pop-a-shot. #include "Adafruit_GFX.h" //create Adafruit Alphanumeric Display objectĪdafruit_AlphaNum4 alpha4 = Adafruit_AlphaNum4() //define integerĪlpha4.writeDisplay() } void loop() Īlpha4.writeDigitAscii(2, (highscore%10) + '0') Īlpha4.writeDigitAscii(1, (highscore%100/10) + '0') Here is the sketch: //include libraries #include Every time the distance sensor is tripped, 1 is added to the integer count, thereby updating the score on the display.
![basketball hoop but plug basketball hoop but plug](https://cdn.shopify.com/s/files/1/0692/8675/products/EliteArtboard_3_609af8b3-a6ae-462c-ac6b-7703b2b67792_grande.jpg)
I created the breadboard schematic above with Fritzing, but here are the connections I used:Ĭode-wise, I created an integer called Score that is always displayed on the alpha display. It's much smaller and gets the basic job of motion detection done efficiently. I almost went with the ultrasonic distance sensor until I saw the Sharp digital sensor listed in my parts list. Regardless, downsizing to the Micro made the possibility of fitting it all into a half-sized breadboard a reality. I really wanted to use a Trinket instead of the Micro, but I couldn't get my sketch small enough to fit on the Trinket. Scaling down the individually mapped LED segments to a quad alphanumeric display with an IC2 backpack from Adafruit made the coding easier and looked sharper than anything I would make from scratch. Taking ohoilette's concept, I identified that I wanted a basketball hoop that had a visible score displayed, controlled by an Arduino and triggered by a distance sensor focused on the net.