Click here to register for summer batches of robotics. Click here for details of courses.
- AR-AD1: Sanguinoscope Blood Group Typing Project
- AR-AD2: Arduino Advanced Calculator
- AR-AD3: Arduino based Fastest Figure First Controlling System for Quiz Competition
With this system we can detect the fastest finger first action in a quiz competition conducted in schools & colleges. For this project you require following components.
Contents
show
Required Components
- Arduino UNO/Nano – 1
- 5mm Red LEDs – 5 (not shown in circuit. Connect 5mm and 10mm LEDs in parallel. Fit 5 LEDs on one side of the white box and 5 LEDs on other side. One side of the box will serve as display for contestants and judges and other side of the box will serve as display to the public, who are watching the competition)
- 10mm Red LEDs – 5
- RC sockets – 5 (not shown in circuit, but can be seen in photograph)
- RC pins – 5 (not shown in circuit, but can be seen in photograph)
- 1k resistors – 5
- 12V/9V adapter socket – 1 (you can use a socket to power the system through external power supply like using a 12V/9V DC Adapter)
- 9V, 1A transformer – 1
- 1N4007 diodes – 2
- Regulator IC 7805 – 1
- 1000uF capacitor – 2
- Small size zero PCB – 1 (solder the circuit components on it)
- PVC boxes 10” x 12” – 2 (the two pvc boxes are fitted back to back on each other so that the complete box can be easily placed on a table with firm base)
- PVC boxes 4” x 4” – 5 (in photograph of the project 6 small white boxes are shown, but as the code is designed to reset the system itself automatically, so 6th box is not necessary)
- Push-to-on switches – 5 (in photograph of the project 6 small white boxes are shown, but as the code is designed to reset the system itself automatically, so 6th switch is not necessary)
- Connecting wires, etc.
The Code
/* This code was developed by Vidyasagar Academy Akola, * www.vsa.edu.in * License: You can use it for any purpose as long as you don't * claim that you are its author and * you don't alter License terms and * formulations (lines 1-9 of this file). * Project: The 5 Channel Quiz Controlling System with auto reset using Arduino nano * Date of Creation: 17.02.2020 */ /* ======= Connection details ======= Switches connections: player1: A0, player2: A1, player3: A2, player4: A3, player5: A5 LED1: pin-D2, LED2: pin-D3, LED3: pin-D4, LED4: pin-D5, LED5: pin-D6 Buzzer: pin-D7 */ int x=1; int LED1=2; int LED2=3; int LED3=4; int LED4=5; int LED5=6; int buzzer=7; void setup() { pinMode(A0,INPUT); // player1 switch input pinMode(A1,INPUT); // player2 switch input pinMode(A2,INPUT); // player3 switch input pinMode(A3,INPUT); // player4 switch input pinMode(A5,INPUT); // player5 switch input pinMode(LED1,OUTPUT); pinMode(LED2,OUTPUT); pinMode(LED3,OUTPUT); pinMode(LED4,OUTPUT); pinMode(LED5,OUTPUT); pinMode(buzzer,OUTPUT); reset(); delay(1000); //reset(); //delay(1000); //reset(); //delay(1000); //reset(); //delay(1000); } void loop() { int a=digitalRead(A0); // reading pin values for 5 buttons int b=digitalRead(A1); int c=digitalRead(A2); int d=digitalRead(A3); int e=digitalRead(A5); if(a==LOW) // if player1 presses button { if(x==1) // check if x is 1, if yes then execute the code { digitalWrite(buzzer,HIGH); // buzzer alert that a switch is pressed digitalWrite(LED1,HIGH); x++; delay(3000); digitalWrite(buzzer,LOW); } } if(b==LOW) // if player2 presses button { if(x==1) // check if x is 1, if yes then execute the code { digitalWrite(buzzer,HIGH); // buzzer alert that a switch is pressed digitalWrite(LED2,HIGH); x++; delay(3000); digitalWrite(buzzer,LOW); } } if(c==LOW) // if player3 presses button { if(x==1) // check if x is 1, if yes then execute the code { digitalWrite(buzzer,HIGH); // buzzer alert that a switch is pressed digitalWrite(LED3,HIGH); x++; delay(3000); digitalWrite(buzzer,LOW); } } if(d==LOW) // if player4 presses button { if(x==1) // check if x is 1, if yes then execute the code { digitalWrite(buzzer,HIGH); // buzzer alert that a switch is pressed digitalWrite(LED4,HIGH); x++; delay(3000); digitalWrite(buzzer,LOW); } } if(e==LOW) // if player5 presses button { if(x==1) // check if x is 1, if yes then execute the code { digitalWrite(buzzer,HIGH); // buzzer alert that a switch is pressed digitalWrite(LED5,HIGH); x++; delay(3000); digitalWrite(buzzer,LOW); } } if(x==2) { delay(2000); digitalWrite(LED1,LOW); digitalWrite(LED2,LOW); digitalWrite(LED3,LOW); digitalWrite(LED4,LOW); digitalWrite(LED5,LOW); delay(1000); reset(); delay(1000); //reset(); //delay(1000); x=1; } } void reset() { for(int i=0;i<4;i++) { digitalWrite(LED1,HIGH); digitalWrite(LED2,HIGH); digitalWrite(LED3,HIGH); digitalWrite(LED4,HIGH); digitalWrite(LED5,HIGH); digitalWrite(buzzer,HIGH); delay(100); digitalWrite(LED1,LOW); digitalWrite(LED2,LOW); digitalWrite(LED3,LOW); digitalWrite(LED4,LOW); digitalWrite(LED5,LOW); digitalWrite(buzzer,LOW); delay(100); } }