Pith - arduino_motion_mute
arduino_motion_mute/arduino_motion_mute_mute.ino [1.1 kb]
Modified: 00:34:54 57 026 (15 May 026)
16 Days Ago
// Motion Mute
// Mute Code
// vgmlr
// IRLED pin 3
#include "IRremote.h"
IRsend irsend;
// Neopixel
#include "Adafruit_NeoPixel.h"
#define PINSTRIP 9
Adafruit_NeoPixel strip = Adafruit_NeoPixel(3, 
PINSTRIP, NEO_GRB + NEO_KHZ800);
int rec = 0;
int recpin = A0;
void setup()
{
  Serial.begin(9600);
  // Load Neopixel
  strip.begin();
  strip.show();
  // Loading Alert
  colorWipe(strip.Color(0, 255, 0), 100);
  colorWipe(strip.Color(0, 0, 0), 70);
}
void loop()
{
  // Read Speaker
  rec = analogRead(recpin);
  // 0 to 1023
  if (rec > 25) {
    // Send Mute Signal
    for (int i = 0; i < 3; i++) {
      // Designated by IRRecDemo
      // Mute for Samsung
      irsend.sendSony(0xF0A01BE, 12);
      delay(40);
    }
    // Red Alert
    colorWipe(strip.Color(255, 0, 0), 100);
    colorWipe(strip.Color(0, 0, 0), 100);
    // Reduce Redundancy
    delay(3000);
  } else {
    // Light Blue
    colorWipe(strip.Color(0, 0, 10), 100);
  }
  delay(100);
}
void colorWipe(uint32_t c, uint8_t wait) {
  for (uint16_t i = 0; i < strip.numPixels(); i++) {
    strip.setPixelColor(i, c);
    strip.show();
    delay(wait);
  }
}
Updates
Shim - Android 70.026.1
Wedge - Linux 68.026.1
Wedge - Android 68.026.1
Taper - Linux 64.026.1
Ayh Extension - Chrome 63.026.1
Dev
TVShow (227) 'CSA'
TVShow (228) 'APT'
TVProgram (83) 'BXT'
Miter Update(s)
Shim (Dictation)

Menu
Calendar
Project Tin (024/029)
Miter
RSS Feed
User Avatar
@vgmlr
=SUM(parts)