Tanishq Jaiswal
Published

Buzz Wire Game

I will guide you on how to make a popular buzz wire game using Arduino and Buzzer.

BeginnerProtip2 hours13,331

Things used in this project

Hardware components

Arduino Nano R3
Arduino Nano R3
×1
LED (generic)
LED (generic)
×1
UTSOURCE 10k ohm resistor
×1
female buck pins
×1
universal PCB
×1

Story

Read more

Schematics

schematic

Code

code.ino

Arduino
int wire = 2;
int led = 4;
int buzzer = 3;

void setup() {

  Serial.begin(9600);
  pinMode(led,OUTPUT);
  pinMode(buzzer,OUTPUT);
  pinMode(wire, INPUT);
  digitalWrite(led,LOW);
  digitalWrite(buzzer,LOW);
}

void loop() {

  int buttonState = digitalRead(wire);
  if(buttonState==1)
  {
    digitalWrite(led,HIGH);
     digitalWrite(buzzer,HIGH);
  }

  Serial.println(buttonState);
         
}

Credits

Tanishq Jaiswal

Tanishq Jaiswal

39 projects • 54 followers
I'm from India and love making projects on electronics and especially with Arduino.

Comments