Last active
December 23, 2019 03:33
-
-
Save dsvakola/4dc496ca7dee54db3a1bf73a40dc4203 to your computer and use it in GitHub Desktop.
The 5 channel quiz control system with auto reset facility is a unique project with Arduino nano. There is no need to reset the system everytime by the quiz taker judges panel. It automatically resets after each round of questioning. The code is incomplete given as a sample.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Arduino Nano based 5 Channel Quiz Controlling System with automatic reset | |
* Yash Vidyasagar | |
* www.vsa.edu.in | |
* Date: 17.12.2019 | |
* | |
/* | |
======= Connection details ======= | |
Switches connections: | |
player1: A0, player2: A1, player3: A2, player4: A3, player5: A4 | |
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 *** A4 was faulty in my kit, so used A5 *** | |
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); | |
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); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment