Tekko BDSimSimulatorProjects

বাটন চাপলে বাতি জ্বলেButton turns on a light

▶ ফ্রি চালিয়ে দেখো / Run it free Parts অর্ডার করো (WhatsApp)

যা যা লাগবে · Parts you need

তার লাগানো · Wiring

Arduino Uno D2→Push button 1
Push button 2→Arduino Uno GND.3

Code (Arduino C++)

// Press the button: the L LED turns on
const int buttonPin = 2;

void setup() {
  pinMode(buttonPin, INPUT_PULLUP);  // pressed = LOW
  pinMode(13, OUTPUT);
  Serial.begin(9600);
}

void loop() {
  if (digitalRead(buttonPin) == LOW) {
    digitalWrite(13, HIGH);
  } else {
    digitalWrite(13, LOW);
  }
}

ভিডিও · Videos

Arduino Bangla tutorial | Arduino led control with a push button.Basic push button contro…Push Button and LED with Arduino(code explained) | Control LED with push button | Arduino…

আরো project · More projects