element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino
  • Products
  • More
Arduino
Arduino Forum LED Button push light up
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 38 replies
  • Subscribers 389 subscribers
  • Views 25985 views
  • Users 0 members are here
  • sequence
  • led
  • button
Related

LED Button push light up

Josephmbrandtii
Josephmbrandtii over 3 years ago

Attempting to make a Cornhole score board with 21 lights that light up at each button push.  At the end of the chain i want it to shut off the lights so there is none.  I am very new to this and have only gotten to the research part.  Any help i can get will be amazing.  Thank you.

  • Sign in to reply
  • Cancel

Top Replies

  • beacon_dave
    beacon_dave over 3 years ago +7
    Is the button to be controlled by a person or is the button controlled automatically by the cornsack/beanbag passing through the hole in the board ? What sort of lights are you planning on using ? Individual…
  • javagoza
    javagoza over 3 years ago +5
    Maybe you can use addressable LEDs https://www.makerguides.com/how-to-control-ws2812b-individually-addressable-leds-using-arduino/
  • geralds
    geralds over 3 years ago in reply to Josephmbrandtii +5
    Hi, here a suggestion: As I saw you have drawn it from the example from the datasheet. Now this is the complete circuit including the bypass capacitors and one of a possible method to make the…
  • beacon_dave
    0 beacon_dave over 3 years ago in reply to Josephmbrandtii

    Depending on the requirements, another alternative to consider might be to drive a pair of 7-segment displays to give a numerical readout display.

    There are a few designs floating around for creating large displays for sports timers etc.

     /challenges-projects/element14-presents/project-videos/w/documents/5196/episode-482-gigantic-3d-printed-7-segment-display-clock

    https://learn.adafruit.com/ninja-timer-giant-7-segment-display

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • beacon_dave
    0 beacon_dave over 3 years ago in reply to Josephmbrandtii

    More documentation on the FastLED library here:

    https://github.com/FastLED/FastLED/wiki/Basic-usage

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • javagoza
    0 javagoza over 3 years ago in reply to beacon_dave

    ralphjyrecently tested a very interesting product that consists of a matrix of 10x10 addressable rgb leds that come unconnected and that can be very useful for a project like this, being able to use one or more leds for each score unit depending on the intensity of light that you need. And since they have to be wired, you decide the distance between each LED.

    (+) NeoPixel Dice - Ralph Yamamoto's Blog - Personal Blogs - element14 Community

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • beacon_dave
    0 beacon_dave over 3 years ago in reply to javagoza

    Well remembered ! Adafruit do something similar using their Flora pixels if you want something a bit larger to work with.

    https://www.adafruit.com/product/1559

    It is not clear though if the design of the scoreboard is already finalised or not. If it is a retrofit to a typical vertical style scoreboard then the LED strip spacing will need to be close enough to that of the spacing of the numbers already printed. The strings may be easier to work with than the tapes.

    Some scoreboards have holes for pegs, so not sure if the intention is to try and stick a LED into an existing peg hole, so a round LED of suitable diameter may work better than a square pixel.

    Also not clear as to the number of scoreboards involved. If it's a one-off, then hand soldering the 42 LEDs isn't much of an issue. If it is 10+ then pre-wired strings/tapes may start looking like a good plan.  

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Josephmbrandtii
    0 Josephmbrandtii over 3 years ago in reply to beacon_dave

    I am planning on drilling holes for the bulbs to go in. And the light next to the score to be lit. After 21 points I want it to have all lights go out on the next button push.  Once I have that figured out I need to do it for both sides. 

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • beacon_dave
    0 beacon_dave over 3 years ago in reply to Josephmbrandtii

    Perhaps create a variable to hold the button press count.

    Each button press increments the count variable by one.

    Then check the current value of the count variable.

    If it is less than 1 then turn off all the LEDs. 

    If it is between 1 and 21 then turn off all the LEDs and then turn on the LED that matches the current count value.  

    If it is greater than 21, then turn off all the LEDs and then reset the count back to 0.

    For the second side you just need a second counter that gets incremented by the second button.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • dougw
    0 dougw over 3 years ago

    It sounds like you could just connect a 22 bit Johnson counter to 21 lights with a debounced button to count up. Three CD4017 chips (~$0.11 each) cascaded would could make a 21 bit Johnson counter. You would need a MOSFET on each output to drive each light.

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • ntewinkel
    0 ntewinkel over 3 years ago in reply to dougw

    dougw that sounds like the best plan yet - I was biased into thinking of using a microcontroller, but using counter chips simplifies the whole process.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • colporteur
    0 colporteur over 3 years ago in reply to dougw

    image

    I have had very good success with units similar to this MOSFET module. The price was less than $2 CAN at one point but supply shortages have driven costs up. Shop around and you can get discounts if purchased in quantity. 

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • ntewinkel
    0 ntewinkel over 3 years ago in reply to dougw

    @dougw  @colporteur - would a transistor array chip work for that? I've never used them, but this ULN2004 chip available here on Newark seems to combine 7 transistors at 500mA each.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
<>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube