How to control 5 LED with one button using arduino uno-3 styles!! LED project!!

Поделиться
HTML-код
  • Опубликовано: 28 авг 2024
  • This video shows you how to control 5 LED with one button by using Arduino Uno-with 3 ways. If you have got any doubts, you can ask in the comments below. Please help to subscribe to see new project. Thank you!!

Комментарии • 11

  • @pedron.2355
    @pedron.2355 8 месяцев назад +1

    Here's the code in the video (mind that you might have to alter the spaces in some areas once you paste this onto the Programmer):
    // Mode 1
    int led1 = 2;
    int led2 = 3;
    int led3 = 4;
    int led4 = 5;
    int led5 = 6;
    int button= 7;
    int A= 0;
    int B = 0;
    int count = 0;
    void setup() {
    // put your setup code here, to run once:
    pinMode (2, OUTPUT);
    pinMode (3, OUTPUT);
    pinMode (4, OUTPUT);
    pinMode (5, OUTPUT);
    pinMode (6, OUTPUT);
    pinMode (7, INPUT);
    }
    void loop () {
    // put your setup code here, to run repeatedly:
    A= digitalRead(7);
    if (A!=B) {
    if(A==HIGH){
    count++; }
    }
    B=A;
    if (count==1) {
    digitalWrite (2,1);}
    if (count==2) {
    digitalWrite (3,1);}
    if (count==3) {
    digitalWrite (4,1);}
    if (count==4) {
    digitalWrite (5,1);}
    if (count==5) {
    digitalWrite (6,1);}
    if (count==6) {
    count= 0;
    digitalWrite (2, 0);
    digitalWrite (3, 0);
    digitalWrite (4, 0);
    digitalWrite (5, 0);
    digitalWrite (6, 0);
    }
    }

  • @MariaPerez-nc7ut
    @MariaPerez-nc7ut 25 дней назад

    this is connect in series ? correct

  • @SeanJedreckEvangelista
    @SeanJedreckEvangelista 4 месяца назад

    void loop() {
    A = digitalRead(7);
    if (A != B) {
    if (A == HIGH) {
    count++;
    }
    }
    B = A;
    if (count

  • @jumnajunu623
    @jumnajunu623 Год назад +9

    you frik why you did not share the coding

  • @annamariegomez2122
    @annamariegomez2122 2 года назад +2

    share code pls

  • @bangarsirphatakhighschoolr915
    @bangarsirphatakhighschoolr915 Год назад

    Is it possible to control 30 led ??

  • @jonathanrosanes3095
    @jonathanrosanes3095 2 года назад

    pota so codes? nagparagibo pa ako pota man

    • @defnotishiro
      @defnotishiro 10 месяцев назад

      HAHAHAHAGAGAGAGAGAGA urit