Arduino Motion Mute
Every male and occasional female (send nu--never mind) has been caught, for so many nefarious things. Puberty often needs a helping hand--wait--I mean to say that there is a solution to secure your dignity from prying ears -- or eyes depending on applied hex code.


Ingredients
1. Arduino Uno (2)
2. PIR Motion Sensor Module
3. Nerf Walkie Talkies (5$US on eBay)
4. IR LED Transmitter
5. IR Receiver (Salvaged)
6. 47 R
7. 2.2K R
8. TIP120
9. 330 R
10. 5V Relay
11. 4001 D
(Optional) Adafruit NeoPixel LED Strip, 1Knf C and 47 R



As the motion sensor is activated, the host MCU triggers the high tone pulse (morse code button) to the other walkie talkie which in turn, the alternate MCU analog reads (A0) voltage from the receiving speaker. When elevated beyond a threshold (identified here as 25) the MCU signals the IR to mute the television and optionally display a LED alert.

A note on refinement for alternative applications -- reduce the delay and transmit pulses (on/off) in Morse so as to reproduce data streams for a broader exchange.

Uh hem, adult entertainment industry, uh hem -- this thing. Eh?!

Sensor Code
// Motion Mute
// Sensor Code
// VijeMiller

int pir = 3;
int beep = 4;

int state = 0;

void setup()
{
pinMode(pir, INPUT);
pinMode(beep, OUTPUT);
}

void loop()
{
state = digitalRead(pir);
if (state == 1) {
digitalWrite(beep, HIGH);
delay(2000);
digitalWrite(beep, LOW);
} else {
digitalWrite(beep, LOW);
}
delay(100);
}

Mute Code
// Motion Mute
// Mute Code
// @VijeMiller

// IRLED pin 3
#include <IRremote.h>
IRsend irsend;

// Neopixel
#include
#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);
}
}

Archive
https://hackaday.io/project/21256-arduino-motion-mute

22:12:54 2-017

@pkvi
"...may not meet professional standards."
12,168 miters
0 miters today
203 tenons
Subscribe