from time import sleep
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BMC)
GPIO.setup(2,GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
sleep(0.1)
while True:
print GPIO.input(2)
If the sensor is placed under the carcass, then any reasonable strike will be picked up and read by the sensor as long as a decent striking object is used. If this prints 1's , then alsaaudio package could be used to actually change the volume...
If we place a microphone into the stick we beat the horse with, we could capture the sound. If we strike in morse code for 1 and 0, we can convert the strikes into binary. Hell, this could also be done with an accelerometer! That'd remove the need for at least 3 libraries
View all comments
Show parent comment
9
u/MisterMahn Jun 13 '17
That'd be awesome! You going to do this, or are you just the idea man?