posts tagged with the keyword ‘teensy’

2015.06.08

Yeahs! Pi!

I presented A Life Time of Yeahs! at Bay View Gallery Night but I didn’t really post much about how it was made, so I’ll do that now, as well as talk about the shortcomings. Above you can see the front and the back. The front piece is actually from an IKEA picture frame I found in the trash. It was a nice smooth MDF-like surface, so I figured it would take the vinyl and paint pretty well.

For the illustration of Mr. Rollins I did a few searches and didn’t find anything that was perfect, so I grabbed a few images as reference and traced/drew my own in Inkscape. I then created a stencil by cutting vinyl on the Silhouette Cameo (including the lettering) and stuck it all down to the IKEA board which I had already painted white.

With the vinyl in place I then painted it all flat black. I didn’t leave it all smooth as it sort of looked too polished, so I smeared some paint around with a brush and then with my fingers so it gave it some texture. I’m still not sure that was the right thing to do, but I did it, and there’s no going back.

Once I had the front piece done I found some scrap wood for the frame in my garage and cut it on the table saw. I made sure the wood was wide enough to fit the speakers into. It was, but as I’ll get to in a bit, wider would have been better…

Yeahs!

The back of the piece contains a Raspberry Pi, a set of speakers, and a Teensy 3.0 with a few buttons connected to it. It’s all powered by a power bank from Brown Dog Gadgets.)

The speakers are USB powered so they, along with the Raspberry Pi, connect to the power bank. Turning on the power bank boots up the Pi and starts a script called “rpisounds.pl” which is a Perl script that starts running and waits for keyboard input to do something. That “something” is playing an audio file if you press the red button on the front of the piece. There’s also a small button on the back of the piece that safely shuts down the Pi if you want to turn it all off.

Yeahs! Pi!

It’s been suggested that the Teensy in addition to the Raspberry Pi is overkill, and… it is! I originally had a separate project that used some of this code and hardware and ended up just grabbing what I had lying around because it was quick and easy. Sometimes it works out that way, and that’s fine…

I should have went with the more powerful speakers I had, because as I learned last time, if you’re doing something with audio in a public space, make it much louder than you think it should be. I had a louder pair of speakers, but they would have required AC power, so I compromised. Oh well. (You can’t tell from the photo, but there are speaker hole drilled in the side of the frame.)

I’ll probably clean up the code and publish it eventually, but essentially it gets kicked off by /etc/rc.local and runs it a continual loop waiting for a key to be pressed. If you press “a” (the button on the front) it randomly selects an WAV file and plays it. If you press the button on the back the script sees a “r” and shuts down. Why an “r” instead of an “s”? I don’t know… There’s another button that was taped up that types a “q” for quit, which quits the script, and is handy for debugging or troubleshooting if you have a monitor and keyboard attached.

That’s the summary of my Raspberry Pi based interactive painting titled “A Life Time of Yeahs!”

I hope you enjoyed it… As always, let me know if you have any questions.

2014.11.16

In case you’re wondering, this is what you see the first time a computer running Mac OX sees a Teensy (or other controller) acting as a USB HID device. (You know, like a keyboard.)

Mac OS X Keyboard

No worries, just hit the “Continue” button…

Mac OS X Keyboard

And then hit the little red dot in the upper left to close the window. Hopefully you’ll only see this the first time.

That’s it!

2014.05.07

Teensy 2.0
Teensy is teensy

For the past few years I’ve been building devices that can emulate computer keyboards. Typically I’ve used the Teensy microcontrollers for this along with the Arduino IDE and the Teensyduino add-on. The things you can do with a Teensy to emulate a keyboard are very impressive! Basically, it’s the best way I know of to create your own custom USB keyboard.

Comparison
Size matters – A-Star with Arduino Micro and Leonardo

When the Arduino Leonardo was introduced, one of the features I was interested in was the ability to emulate a USB keyboard. I never actually got a Leonardo to test this with, mainly because the form factor was too large for my projects. Sometimes shield compatibility is good, sometimes the smallest board wins.

A-Star
Size matters!

I recently got a Pololu A-Star 32U4 Micro, which is a tiny (and cheap, under $13USD) board very similar to a Leonardo, once again using the Atmel ATmega32U4.

There may be a little bit of work involved in getting the A-Star up and running. There are drivers needed if using Windows, and (supposedly) a little more work to get things going with Linux. I had no issues with Mac OS X, but I’m pretty familiar with add-ons for the Arduino IDE due to using Teensyduino. You can also just pretend this is an Arduino Leonardo and that seems to work fine.

(I also can’t tell if the Pololu A-Star 32U4 Micro is open source hardware. They do have a bunch of files available, but I did not see an explicit “Open Hardware” note anywhere. It’s worth mentioning that the Teensy is not open source hardware. If that’s not a big deal to you, then it’s not a big deal to you. The official Arduino hardware is of course, open source.)

I’ll probably keep experimenting with the Pololu A-Star as a keyboard emulator for simple things, and stick with the Teensy for more complex things. I’ve also heard that the Teensy 2.0 will disappear in the future, which isn’t a huge deal, as the Teensy 3.1 is a big improvement over it, but the 3.1 does cost a bit more than the 2.0, so that’s one factor to consider when evaluating which board to use.

Have fun building your own keyboard!

Update #1: I’ve been talking to Pololu and they suggested the A-Star may actually be able to use the Teensyduino Keyboard libraries. I’m awaiting more info on this, as it would be an exciting development.

Update #2: It looks like the Teensyduino Keyboard libraries cannot be installed onto the A-Star, which is good to know. But don’t worry, I’ll be using the A-Star for some future projects anyway. ;)

2012.02.26


Buttons

Today’s Maker Business involved some early morning soldering. (What else would I do at 7am?) Next up is programming, and then I need to drill out all the enclosures. (I’m hoping to do that later in the day.)

Oh, I also built a spray booth this weekend since I’ll be doing a bunch of spray painting. (We also use spray glue in the basement, and this should make that a little less messy.)

2011.07.01

Make

Those guys over at Make (who seem to be my new BFF) mentioned another button I made, which was inspired by Matt’s AWESOME Button post on Make, which in turn inspired Patrick from Milwaukee Makerspace to build a footswitch-style button, which got mentioned on Hackaday, which is where I saw the link to Flip’s 1-Key-Keyboard Project.

It’s getting a little circular in here…

So on the Zen Button post, Flip commented on his 1-Key-Keyboard Project, and noted that it had the same “dead-simple functionality” but was a much lower cost.

Make

The “dead-simple” part was also in the post’s description of my button, but I think that “dead-simple” had more to do with the parts and the build than the function, and here’s why I think that matters.

If you go back to the original AWESOME Button post, you’ll see a few people (including me!) wondered if you could use an Arduino instead of a Teensy. Why? Because the Arduino is cheap, and easy, and lots of people already have one.

But the Teensy is also cheap, and fairly easy, maybe just a wee bit more difficult, but still fairly easy, and you just plug the dang thing in via a USB cable and hey, what could be easier!?

But with ease of use comes a price. If you look at Flip’s 1-Key-Keyboard Project, it’s probably what he considered “dead simple” but to me, I see a list of parts including either a ATTiny45-20PU, or ATTiny85-20PU, or ATTiny85, or ATTiny45… and then there’s a few resistors, diodes, capacitors, some prototype-board, and a programmer that works with the Atmel AVRs.

Flip has done a great job writing up the project. I mean, I assume he has, but it’s way over my head. All the comments lead me to believe it’s pretty awesome. If you’re comfortable with everything he talks about, and it all makes sense, then that’s awesome too. Either way, I’m definitely glad Flip shared his project.

For those of us not ready to get that deep into AVR development, things like the Teensy or the Atmega 32u4 are simple enough to use that even beginners can get pretty far. Just in blog post comments and some emails I was able to help a few folks get their Teensys up and running.

Remember, everyone starts out as a beginner… but that’s not to suggest that you eventually need to get to the level where you’ll be using an AVR programmer with bare chips if using an Arduino or some other board does what you want with less hassle. Easy really is one of the main reasons the Arduino platform became so popular.

So if you ever see your project on Hackaday, try not to be discouraged by the commenters who are quick to point out how they would have done it better, faster, cheaper, and with 10 times the capabilities of what yours does, because while they were busy leaving discouraging comments, you were busy making something. :)

Cheers!

NOTE: Need a button? Now you can buy one! Visit our store or Etsy.

« Older Entries |


buy the button:

Buy The Button

top recent artists: