Music reactive LED | Sound sensor - Arduino Connections & Coding

Поділитися
Вставка
  • Опубліковано 16 гру 2024

КОМЕНТАРІ • 58

  • @RonaldoHoxha
    @RonaldoHoxha 6 років тому +15

    Add a resistor between led and arduino if you want to protect your arduino....

    • @DaleDix
      @DaleDix 4 роки тому +1

      the led.

  • @DaleDix
    @DaleDix 4 роки тому +6

    You can use the a0 analog pin to get actual voltage amounts for brightness etc. The d0 pin is just going to give you a high or low.

    • @woahwhodis
      @woahwhodis 3 роки тому

      hi! i'm new with arduino.. can you please explain clearly about a0 could get actual numbers for brightness etc? also the code if possible.. thankyou!

    • @woahwhodis
      @woahwhodis 3 роки тому

      hi! i'm new with arduino.. can you please explain clearly about a0 could get actual numbers for brightness etc? also the code if possible.. thankyou!

    • @LazarusAugment
      @LazarusAugment 3 місяці тому

      thanks

  • @bugiroff9926
    @bugiroff9926 6 років тому +2

    I used a transistor in my setup to control a strip LEDs with a 12 volt power supply. The setup is very similar to yours, just with the transistor in place of the led. Works great. Mines setup using an attiny85, but the same process still applies.

    • @lou5400
      @lou5400 2 роки тому

      which transistor did you use please?

    • @bugiroff9926
      @bugiroff9926 2 роки тому

      @@lou5400 it was just a tiny NPN transistor. Cheap little 3 legged deal. I can get you a part number later, but I'm no where near it right now.

    • @lou5400
      @lou5400 2 роки тому

      @@bugiroff9926 Thank you for your answr. could you explain me how you wire the LED 12V strip ? You plug the + and the - just like the LED?

    • @lou5400
      @lou5400 2 роки тому

      please help me

  • @JamisenMa
    @JamisenMa 6 років тому

    How would you make the signal show up on Arduino's serial monitor?

  • @itsstrendy28
    @itsstrendy28 5 років тому

    I have 3 pin sounds sensor vcc gnd and out and I want to connect blue color led strip to this project rather than led so please tell me the connection and what to change in code. I am your old subscriber

  • @michaeldeloso9042
    @michaeldeloso9042 8 місяців тому

    Good day Sir 👋
    How to setup code for my 4pin led rgb module in which the led fast changing colors blinks in line with the speed of music beat or noise and automatically turn to super slow changing color mode when there is no music or noise detected on the surroundings?

  • @Plqnes
    @Plqnes 4 роки тому

    Pls show for 2812B strip ;( I want to do but cannot find code or video and my sound sensor is red one (mini) it has analog oo ground and 5v (4 volts)

  • @bhavnahingu6634
    @bhavnahingu6634 4 роки тому +2

    You make the most perfect vedios

  • @jamesarrowsmith427
    @jamesarrowsmith427 3 роки тому

    How would I modify this to trigger a 12v solenoid instead of a LED and could I replace the electret microphone for a jack input ?

    • @MechStuff
      @MechStuff  3 роки тому +1

      Hello, you will need a driver module to operate a 12V solenoid. For such devices which demand more voltage, I have another video, check it out - ua-cam.com/video/D3TFmpsPuUk/v-deo.html

  • @kunalgawde5819
    @kunalgawde5819 5 років тому +2

    Hey there is error in the program.....
    What should I do...?

    • @aminekhallouf6798
      @aminekhallouf6798 5 років тому

      he just make no espace in the code so this is the full right code ;
      int soundsensor = 3;
      int led = 7; // defining pin numbers
      void setup()
      {
      pinMode (soundsensor, INPUT);
      pinMode (led, OUTPUT);
      }
      void loop()
      {
      int sensorvalue = digitalRead (soundsensor); //if the sound intensity is higher than threshold which is set by us,
      //then sensor would return the value as 1
      if (sensorvalue == 1)
      {
      digitalWrite(led, HIGH);
      }
      else
      {
      digitalWrite(led, LOW);
      }
      }

  • @Donkey_1
    @Donkey_1 Рік тому

    does anyone know how I can add more LEDS?

  • @anuragdubey5146
    @anuragdubey5146 4 роки тому

    Nice vedio
    Bro
    please can you tell me that
    if you give command from this sound detector chip to aurdino is that work will happen
    like turn off light
    turn on light
    paasing 0 & 1
    on specific words which we decide

  • @jjcolony11rohiniii50
    @jjcolony11rohiniii50 4 роки тому

    Can you please explain the connection in arduino nano ?

  • @woahwhodis
    @woahwhodis 3 роки тому

    hey i got a question.. my LED light won't turn on and off with the sound sensor..

    • @MechStuff
      @MechStuff  3 роки тому

      Hello, did you adjust the sensitivity of the sensor properly?

  • @lou5400
    @lou5400 2 роки тому

    can you explain how you make with a 12LED STRiP please?

    • @MechStuff
      @MechStuff  2 роки тому

      Hello! You will need driver like L298 for that.. because the LED strip will require either 9V or 12V. I have a separate tutorial on driver module, hope it will provide you more insights - ua-cam.com/video/D3TFmpsPuUk/v-deo.html

    • @lou5400
      @lou5400 2 роки тому

      @@MechStuff thank you sir i'm watching your video but where should i connect it to the arduino? I can connect the led strip and the battery but how to connect the driver to the arduino please?

  • @tamazg1751
    @tamazg1751 5 років тому

    Is there a way to keep the LED on when it hears a sound, and then have it turn off when it hears another?

    • @Codewithmughal
      @Codewithmughal 4 роки тому

      Change the condition altogether.. like if sensor gets value 1 then set left off. And else switch it on

  • @Zach0324
    @Zach0324 5 років тому +1

    Code didn't work for me. expected primary-expression before '

    • @MRPSKch
      @MRPSKch 5 років тому

      me too

    • @sagnikchatterjee8122
      @sagnikchatterjee8122 5 років тому

      @@MRPSKch int soundsensor = 3;
      int led = 7; // defining pin numbers
      void setup()
      {
      pinMode (soundsensor, INPUT);
      pinMode (led, OUTPUT);
      }
      void loop()
      {
      int sensorvalue = digitalRead (soundsensor); //if the sound intensity is higher than threshold which is set by us,
      //then sensor would return the value as 1
      if (sensorvalue == 1)
      {
      digitalWrite(led, HIGH);
      }

      else
      {
      digitalWrite(led, LOW);
      }

      }
      This is the working code

    • @woahwhodis
      @woahwhodis 3 роки тому

      @@sagnikchatterjee8122 hey man, is this code really works? i haven't try it cause I'm still waiting for my physical arduino to came.

    • @sagnikchatterjee8122
      @sagnikchatterjee8122 3 роки тому

      @@woahwhodis Worked for me though bt give it a try u can once ping I'll try something diff then

    • @woahwhodis
      @woahwhodis 3 роки тому

      @@sagnikchatterjee8122 thanks! anyway got a question is this project can be included as physical interaction that controls sound in a continuous, controllable manner???

  • @kyriakil711
    @kyriakil711 5 років тому

    Can you add more than one LED?

    • @niniksriwulandari3857
      @niniksriwulandari3857 5 років тому

      Ive try to use 4 led. But when i clap, led on and just turn off again

  • @dannismith3038
    @dannismith3038 2 роки тому

    can you make a video of this but with 3 leds please

  • @rehakproduction
    @rehakproduction 6 років тому

    Hey, great video! If I wanted to use this with a 5m LED strip, should I connect everything through a breadboard with a 50V power supply?

    • @MechStuff
      @MechStuff  6 років тому +1

      Hi.. Connecting a whole LED strip is a bit different. You will require a driver module for that. Also for strip, you only need a 12V supply.. 50V would probably burn the whole strip..lol

    • @Dr_Khanz
      @Dr_Khanz 5 років тому

      Use relay module

  • @brianrego5622
    @brianrego5622 6 років тому +1

    Great video!

  • @Mr___f
    @Mr___f 4 роки тому +1

    Code just had light turn on. No reaction to sound at all.

    • @kevmat82
      @kevmat82 4 роки тому

      im having same issue

    • @MechStuff
      @MechStuff  4 роки тому +1

      Hey there, I think the issue lies with sensitivity. You must adjust the threshold of potentiometer as mentioned at 3:25. That should do your work :)

  • @ThePureblood93
    @ThePureblood93 6 років тому

    THANK YOU!

  • @andyapple9
    @andyapple9 3 роки тому

    Hi, sir what is the song name?

    • @MechStuff
      @MechStuff  3 роки тому

      Song used in the start - Magic by Coldplay
      Song used at the last - Pingpong by Armin Van Buuren
      Enjoy 😉

  • @yashasv.doodles
    @yashasv.doodles 5 років тому

    i tried putting the code in but it just says
    exit status 1
    a function-definition is not allowed here before '{' token
    what to do?

    • @davidb9896
      @davidb9896 5 років тому

      the code in the link is missing a line from the one he shows in the video. add a "void setup()" after the two "int" and before the bracket.
      here's the correct code:
      int soundsensor = 3;
      int led = 7;
      void setup()
      {
      pinMode (soundsensor, INPUT);
      pinMode (led, OUTPUT);
      }
      void loop()
      {
      int sensorvalue = digitalRead (soundsensor);
      if (sensorvalue == 1)
      {
      digitalWrite(led, HIGH);
      }
      else
      {
      digitalWrite(led, LOW);
      }
      }
      hope this helps :)

  • @isulaperera
    @isulaperera 4 роки тому +1

    01:58 ❤️

  • @lokeshlucky7593
    @lokeshlucky7593 4 роки тому

    Beat name

    • @MechStuff
      @MechStuff  4 роки тому

      Coldplay - Magic and Armin Van Buuren - PingPong

  • @gcagca3001
    @gcagca3001 4 роки тому

    I don't trust this video because... it does not use a resistor soo.. I PUT ONE

    • @lou5400
      @lou5400 2 роки тому

      where did you put it please?

    • @lou5400
      @lou5400 2 роки тому

      and which resistor did you put? 10k?