element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • 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 and Partners
    Products and Partners
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • 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
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • 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
Community Hub
Community Hub
Member's Forum game showbuzzer
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Leaderboard
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Community Hub to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 7 replies
  • Subscribers 632 subscribers
  • Views 639 views
  • Users 0 members are here
  • gameshow buzzer issues
Related

game showbuzzer

sluga
sluga over 8 years ago

i have made a 5 player lockout gameshow buzzer

im using a audrino uno

audrino is hooked up to a breadboard with 5 v from audrino goint to it

all 5 buttons have 1.3kohm risisters on them

the reset is on pin 2

ad does not go to the breadboard  but goes straight to the button with earth pin 14 i think ?

all buttons are hooked to each box through a rj45 keystone

all buttons work fine

BUT as soo as my hand goes anywhere near the reset switch it triggers  the reset button

touching the reset box,putting hand anywhere within 4 inches of reset box triggers the reset switch

WHAT IS MY SOLUTION

any help would be great

can attach the buzzer code if needed

peter

Attachments:
image
image
  • Sign in to reply
  • Cancel
  • sluga
    sluga over 8 years ago in reply to mcb1

    ok added risistors to reset

    looks like 3 buttons work now

    and 2 faulty keystone connectors are the problem now

    so thanks for now the reset button NOW WORKS EXCELLENT

    and when i get time ill do the 2 faulty keystones

    BUT 3 IS GOOD FOR NOW

    thanks

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Cancel
  • mcb1
    mcb1 over 8 years ago in reply to sluga

    sluga

    To insert code ... paste it in, then highlight it and select the >> on the menu.

    Select Syntax Highlighting and then C++.

     

    //This code was written by Bob Clagett for I Like To Make Stuff - 2016
    //It accompanies the project at http://www.iliketomakestuff.com/make-quiz-game-buttons
    //This is for a simple 4 player quiz game setup.
    //Only one button will light at a time, until the reset button is pressed.
    //The reset button turns off all LEDs and sets everything up for the next "round".
    
    ///Define Buttons
    //Reset Button
    int resetButtonPin = 2;
    
    //Button1
    int button1Pin = 13;
    int led1Pin = 12;
    int button1State = 0; 
    
    //Button2
    int button2Pin = 11;
    int led2Pin = 10;
    int button2State = 0; 
    
    //Button3
    int button3Pin = 9;
    int led3Pin = 8;
    int button3State = 0; 
    
    //Button4
    int button4Pin = 7;
    int led4Pin = 6;
    int button4State = 0; 
    
    int resetButtonState = 0;
    boolean pollingForPresses = 1;
    
    int lastbutton1State = LOW;
    int lastbutton2State = LOW;
    int lastbutton3State = LOW;
    int lastbutton4State = LOW;
    int lastResetState = LOW;
    
    void setup() {
      Serial.begin(9600);
      // initialize the LED pin as an output:
      pinMode(led1Pin, OUTPUT);
      pinMode(led2Pin, OUTPUT);
      pinMode(led3Pin, OUTPUT);
      pinMode(led4Pin, OUTPUT);
      // initialize the pushbutton pin as an input:
      pinMode(resetButtonPin, INPUT);
      pinMode(button1Pin, INPUT);
      pinMode(button2Pin, INPUT);
      pinMode(button3Pin, INPUT);
      pinMode(button4Pin, INPUT);
    }
    
    void loop() {
    
      int reading1 = digitalRead(button1Pin);
      int reading2 = digitalRead(button2Pin);
      int reading3 = digitalRead(button3Pin);
      int reading4 = digitalRead(button4Pin);
      int readingReset = digitalRead(resetButtonPin);
    
        if(pollingForPresses==1){
          //Button 1
          if (reading1 != button1State && reading1 != lastbutton1State) {
            button1State = reading1;
            button1State = digitalRead(button1Pin);
              
                  if (button1State == HIGH) {
                    // turn LED on:
                      Serial.print("Button 1 ON");
                    digitalWrite(led1Pin, HIGH);
                    pollingForPresses = 0;
                  }
             button1State = 0;
          }
       
          //Button 2
          if (reading2 != button2State && reading2 != lastbutton2State) {
            button2State = reading2;
            button2State = digitalRead(button2Pin);
              
                  if (button2State == HIGH) {
                    // turn LED on:
                      Serial.print("Button 2 ON");
                    digitalWrite(led2Pin, HIGH);
                    pollingForPresses = 0;
                  }
             button2State = 0;
          }
    
          //Button 3
          if (reading3 != button3State && reading3 != lastbutton3State) {
            button3State = reading3;
            button3State = digitalRead(button3Pin);
              
                  if (button3State == HIGH) {
                    // turn LED on:
                      Serial.print("Button 3 ON");
                    digitalWrite(led3Pin, HIGH);
                    pollingForPresses = 0;
                  }
             button3State = 0;
          }
    
          //Button 4
          if (reading4 != button4State && reading4 != lastbutton4State) {
            button4State = reading4;
            button4State = digitalRead(button4Pin);
              
                  if (button4State == HIGH) {
                    // turn LED on:
                      Serial.print("Button 4 ON");
                    digitalWrite(led4Pin, HIGH);
                    pollingForPresses = 0;
                  }
             button4State = 0;
          }
          
        }
       //Check reset button
       
        if (pollingForPresses==0) {
        
          if (readingReset != resetButtonState && readingReset != lastResetState) {
                  resetButtonState = digitalRead(resetButtonPin);
              
                  if (resetButtonState == HIGH) {
                    Serial.print("Reset button HIGH");
                    resetButtons();
                  }
             
             resetButtonState = 0;
          }
        }
      lastResetState = readingReset;
      lastbutton1State = reading1;  
      lastbutton2State = reading2;
      lastbutton3State = reading3;  
      lastbutton4State = reading4;
    }
    
    
    void resetButtons() {
      
      lastbutton1State = 0;
      lastbutton2State = 0;
      lastbutton3State = 0;
      lastbutton4State = 0;
      resetButtonState = 0;
      lastResetState = 0;
      
      button1State = 0;
      button2State = 0;
      button3State = 0;
      button4State = 0;
      
      Serial.print("All the Buttons where reset!");
      
      digitalWrite(led1Pin, LOW);
      digitalWrite(led2Pin, LOW);
      digitalWrite(led3Pin, LOW);
      digitalWrite(led4Pin, LOW);
      digitalWrite(resetButtonPin, LOW);
      
      pollingForPresses = 1;
    }

     

     

    The first issue is Pin13 is normally the one with an onboard LED.

    Using it as button1 will cause issues.

    I'd suggest swapping the LED and the button.

     

    I was wrong about the internal pull down resistor ... sorry.

    The Atmel328 has 50k pullups internally.

     

    If your bttons are connected to a common point, you could change this from +5v and make it ground.

    You'd need to enable the pull-ups and invert the code at lines like this if (button1State == HIGH) to if (button1State == LOW)

     

    Sorry if I got your hopes up. I always have buttons between the pin and ground.

     

    Mark

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • sluga
    sluga over 8 years ago in reply to mcb1

    added it to question

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • sluga
    sluga over 8 years ago in reply to mcb1

    it would be great if i could add solution through cod as ive mounted it in box damn but i can always pull it out its only mouneted lightly

    Attachments:
    quiz-game-buttons-master.zip
    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • mcb1
    mcb1 over 8 years ago

    can attach the buzzer code if needed

    That would be helpful.

    The Inputs either need a pullup, or pulldown resistor externally, OR you can define it in the software under setup().

     

    Mark

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • genebren
    genebren over 8 years ago

    It is a little difficult to determine the setup by looking at the breadboard.  The resistors all seem to be floating (not connected).  Do you have a schematic of your setup?  The reset almost sounds more like an antenna than a switch.  Is it possible that you do not have a pull-up or pull-down resistor on the reset line (depending on the polarity of the reset line)?

     

    Gene

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Cancel
  • dougw
    dougw over 8 years ago

    If you already have a 1.3K resistor pull down on the arduino input, try also putting a .22uf cap between arduino input and ground.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • 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 © 2026 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.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube