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 Simple LED Sequence with Button Question..
  • 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 Verified Answer
  • Replies 20 replies
  • Answers 1 answer
  • Subscribers 394 subscribers
  • Views 4363 views
  • Users 0 members are here
Related

Simple LED Sequence with Button Question..

medictrode
medictrode over 10 years ago

Hello all..

 

I want to make a simple 3 LED Sequence circuit and would like some assistance as to where to get started. Basically, press a push button, have LED1 Light, press it again, LED2 Light, Press again LED3 on, Press again back to LED1.Etc... I just can't get it in my head to to what code to use. Thank you for any assistance.image

  • Sign in to reply
  • Cancel

Top Replies

  • medictrode
    medictrode over 10 years ago in reply to D_Hersey +2
    Your 100% correct but You can do a lot of the arduino basic projects you see floating around with the old school simple logic chips. In my case I already built one with a hardware debounce circuit and…
  • mcb1
    mcb1 over 10 years ago in reply to medictrode +2 verified
    George Well done on exploring the possibilities of microcontrollers. Yes you could do this with hardware, but the idea was to do first steps and learn, then progress to more complicated that cannot be…
  • dmaruska
    dmaruska over 10 years ago in reply to gadget.iom +1
    It seems to test OK on the simulator. Regards, Dave M.
Parents
  • medictrode
    0 medictrode over 10 years ago

    Ok, so I got the code in and am trying my best to wrap my head around what is happening. I currently have 2 issues to deal with. The first is either a hardware or software debounce is needed. The second, which is more of the issue is when I press the button, all three LEDs will illuminate. Once the button is released the next LED will activate correctly, minus any debounce issues. I will play around some more and report any findings. As far as hookup goes, each LED has a current limiting resistor, and the button has a 10k pull up resistor before Pin 2. 

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • gadget.iom
    0 gadget.iom over 10 years ago in reply to medictrode

    Would you mind trying my code on your hardware to see if that works and what issues there might be with that one?

    It's a slightly different approach.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • gadget.iom
    0 gadget.iom over 10 years ago in reply to medictrode

    Would you mind trying my code on your hardware to see if that works and what issues there might be with that one?

    It's a slightly different approach.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
No Data
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