Introduction: 4 Players Competiton/Quiz Buzzer System Using CloudX Microcontroller

4 player quiz buzzer can be used at any competition, to know the team who has pressed the button first, and it will show it on the 7 segment.

Step 1: Components

  • 1* CloudX microcontroller
  • 1* CloudX Softcard
  • 1* V3 USB data Cable
  • 4* Push Button
  • 1* 7 segment
  • 8* 330ohm resisitor
  • 4* 10k resistor
  • 1* Active Buzzer
  • Several jumper wires
  • BreadBoard

you can get your component HERE

Step 2: Experimental Principle

Button 1, 2, 3 and 4 are answer buttons. if button 1 is pressed first, the buzzer will beep, and the segment will display 1, same thing to other pins.

Step 3: Procedures

Let build the circuit using a CloudX microcontroller which read the input from push button and displays the corresponding number on a Segment.

Build the Circuit:

follow the circuit for your connection...

Step 4: Coding

Copy this code to your CloudX IDE

#include <CloudX\M633.h>
#include <CloudX\Segment.h>
char i;
char NumberOfDigit = 1; // set number of 7 segment displays to be used
    // connect these CloudX pins to the Data Pins A,B,C,D,E,F,G and H pins of the Display
    char segmentDataPins[]= {1, 2, 3, 4, 5, 6, 7, 8};
    // connect these CloudX pins to the Common Anode or Cathode of each 7-segment display
    char segmentScanPins[]= 0; // to save pins we connect directly to ground(cathode)
setup(){
           //setup here
    Segment_setting(CCathode,NumberOfDigit,segmentScanPins,segmentDataPins);
    for(i=9; i<=12; i++){
        pinMode(i , INPUT);
    }
    pinMode(13 , OUTPUT);
    
loop(){
           //Program here
     if( !readPin(9) ){
         digitalWrite(13 , ON);
         Segment_write('1', 200);
         digitalWrite(13 , OFF);
     }
    if( !readPin(10) ){
         digitalWrite(13 , ON);
         Segment_write('2', 200);
         digitalWrite(13 , OFF);
    }
    if( !readPin(11) ){
         digitalWrite(13 , ON);
         Segment_write('3', 200);
         digitalWrite(13 , OFF);
      }
    if( !readPin(12) ){
         digitalWrite(13 , ON);
         Segment_write('4', 200);
         digitalWrite(13 , OFF);
      }
}
}