[hackpgh-discuss] Re: Raspberry pi zero

  • From: Matthew Beckler <matthew.beckler@xxxxxxxxx>
  • To: "hackpgh-discuss@xxxxxxxxxxxxx" <hackpgh-discuss@xxxxxxxxxxxxx>
  • Date: Fri, 2 Sep 2016 09:24:39 -0500

Hi Jeremy,

Unless you are trying to do bluetooth, wifi, or connect to a computer/tv
display, I would suggest using a microcontroller instead of the raspi
(which is a full computer running an operating system and all that sort of
overhead you probably don't need and will just waste power). Something like
the Teensy, Arduino Pro Mini, or the adafruit trinket would probably be
perfect. Also does the RasPi zero even have an audio output jack?

If you want to sense motion and output sound, a Teensy + Prop Shield might
do the trick. The Teensy is a really great microcontroller board, and the
prop shield adds motion sensors (10 degrees of freedom), an audio amplifier
that can drive common 4 or 8 ohm speakers.
https://www.sparkfun.com/products/13995 - The Teensy boards are programmed
using the Arduino IDE and are really great, I use them all the time in
museum exhibits. https://www.sparkfun.com/products/13736

If you really want to stick with the raspberry pi zero, what kind of
accelerometer did you get? What is the interface (serial? I2C? analog?).
You'll need to figure out how to access the accelerometer data from a
little script (python or bash or something like that), and then trigger a
command-line audio program like mpg123 or aplay.

Sounds like a fun project!

-Matthew IV



On Fri, Sep 2, 2016 at 12:03 AM, Jeremy Tiogar <jeremy.tioger@xxxxxxxxx>
wrote:

Well, I've got a Raspberry pi zero and an accelerometer on the way. Good
start to the guts of my lightsaber.

Any recommendations on books or sites to get my feet wet?

I need to program it to sense direction and speed to output sound and
power to an LED. Also power on / off like a standard computer with a
momentary contact switch.

Other related posts: