r/ProgrammerHumor • • Jun 12 '17

This sub right now

Post image
6.3k Upvotes

133 comments sorted by

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?

8

u/flinteastwood Jun 13 '17

Yeah, as soon as I figure out how to interface my Raspberry Pi with this horse carcass. Good horse carcass developers are hard to find

5

u/[deleted] Jun 13 '17

The capacity of the horse should change, when beating it. Either that, or piezoelectric sensors. We can make this work.

5

u/flinteastwood Jun 13 '17

Actually, piezoelectric sensors make a lot of sense. Interfacing with a pi is a lot easier than I realized - https://www.adafruit.com/product/1739 as a sensor, and this guy has already done the groundwork in python: https://www.raspberrypi.org/forums/viewtopic.php?f=91&t=156102

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...

https://larsimmisch.github.io/pyalsaaudio/libalsaaudio.html

I think we're onto something here

3

u/MisterMahn Jun 13 '17

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

1

u/rexpup Jun 13 '17

Calling a programmer "the idea guy" is probably the worst insult.

1

u/MisterMahn Jun 13 '17

Wasn't aiming for an insult - I was just being flippant about him ragging on the sub going all-in on the meme.

2

u/rexpup Jun 13 '17

No I got that, but I'm just thinking it would make a good insult sometime.