close-circle
Close
0%
0%

Flashing Light Prize (3) Arduino Scat

Skiddily bee bop ba doo bop skiddily dee bip boop bop, yeah.

Similar projects worth following
close

Sparkfun sound detector triggered by the relay triggers the relay, rinse, repeat.

Skiddily bee bop ba doo bop skiddily dee bip boop bop, yeah.

Notation(s)

1. Special guest mouth hornist, Vije Miller -- the horniest.

2. Zappa dee doo blip blop biddily doo wap be zah.

Archive

https://www.flashinglightprize.com/

http://tvmiller.com/index.php?entry=entry170713-015006

  • 1 × Arduino Uno
  • 1 × SparkFun Sound Detector
  • 1 × 5V Relay
  • 2 × Candle Incandescent Bulb
  • 1 × Cuhlness

View all 7 components

  • Sketchy Zappity Zah

    Vije07/13/2017 at 05:55 0 comments

    // Flashing Light Prize (3) Arduino Scat
    // VijeMiller
    
    // Sound Detector Pins
    #define PIN_GATE_IN 2
    #define IRQ_GATE_IN  0
    #define PIN_LED_OUT 13
    #define PIN_ANALOG_IN A0
    
    // Relay Pin
    int relay = 7;
    
    // Sound Value
    int val;
    
    // SparkFun Sound Detector Interrupt
    void soundISR()
    {
      int pin_val;
      pin_val = digitalRead(PIN_GATE_IN);
      digitalWrite(PIN_LED_OUT, pin_val);
    }
    
    void setup()
    {
      // Testing
      Serial.begin(9600);
      // Sound Detector Pin Assignment
      pinMode(PIN_LED_OUT, OUTPUT);
      pinMode(PIN_GATE_IN, INPUT);
      // Relay Pin Assignment
      pinMode(relay, OUTPUT);
      // Sound Decector Interrupt
      attachInterrupt(IRQ_GATE_IN, soundISR, CHANGE);
    }
    
    void loop()
    {
    
      // Read Sound
      val = analogRead(PIN_ANALOG_IN);
      // Testing
      Serial.println(val);
      // If Sound Exceeds X
      if (val > 55) {
        digitalWrite(relay, HIGH);
        delay(600);
        digitalWrite(relay, LOW);
        delay(200);
      } else {
        digitalWrite(relay, LOW);
      }
    
      delay(10);
    }

  • Flippity Dip Dop

    Vije07/12/2017 at 16:43 0 comments

View all 2 project logs

  • 1
    Diddily Doobie De Bah

View all instructions

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates