More Blinky = More Better – The WS2812FX Library

The WS2812 is an amazing piece of technology. 30 years ago, high brightness LEDs didn’t even exist yet. Now, you can score RGB LEDs that even take all the hard work out of controlling and addressing them! But as ever, we can do better.

Riffing on the ever popular Adafruit NeoPixel library, [Harm] created the WS2812FX library. The library has a whole laundry list of effects to run on your blinkenlights – from the exciting Hyper Sparkle to the calming Breathe inspired by Apple devices. The fantastic thing about this library is that it can greatly shorten development time of your garden-variety blinkables – hook up your WS2812s, pick your effect, and you’re done.

[Harm]’s gone and done the hard yards, porting this to a bevy of platforms – testing it on the Arduino Nano, Uno, Micro and ESP8266. As a proof of concept, they’ve also put together a great demonstration of the software – building some cute and stylish Christmas decorations from wood, aluminium, and hacked up Christmas light housings. Combining it with an ESP8266 & an app, the effects can be controlled from a smartphone over WiFi. The assembly video on YouTube shows the build process, using screws and nails to create an attractive frame using aluminium sheet.

This project is a great example of how libraries and modern hardware allow us to stand on the shoulders of giants. It’s quicker than ever to build amazingly capable projects with more LEDs than ever. Over the years we’ve seen plenty great WS2812 projects, like this sunrise alarm clock or this portable rave staff.
As always, blink hard, or go home. Video after the break.

Continue reading “More Blinky = More Better – The WS2812FX Library”

My DIY BB-8 interior

My DIY BB-8: Problems, Solutions, Lessons Learned

Imagine trying to make a ball-shaped robot that rolls in any direction but with a head that stays on. When I saw the BB-8 droid doing just that in the first Star Wars: The Force Awakens trailer, it was an interesting engineering challenge that I couldn’t resist. All the details for how I made it would fill a book, so here are the highlights: the problems I ran into, how I solved them and what I learned.

Continue reading “My DIY BB-8: Problems, Solutions, Lessons Learned”

Cheap Dual Mirror Laser Projector

[Stanley] wanted to make a laser projector but all he could find online were one’s using expensive galvanometer scanners. So instead he came up with his own solution that is to be admired for its simplicity and its adaptation of what he could find.

At its heart is an Arduino Uno and an Adafruit Motor Shield v2. The green laser is turned on and off by the Arduino through a transistor. But the part that makes this really a fun machine to watch at work are the two stepper motors and two mirrors that reflect the laser in the X and Y directions. The mirrors are rectangles cut from a hard disk platter, which if you’ve ever seen one, is very reflective. The servos tilt the mirrors at high speed, fast enough to make the resulting projection on the wall appear almost a solid shape, depending on the image.

He’s even written a Windows application (in C#) for remotely controlling the projector through bluetooth. From its interface you can select from around sixteen predefined shapes, including a what looks like a cat head, a heart, a person and various geometric objects and line configurations.

There is a sort of curving of the lines wherever the image consists of two lines forming an angle, as if the steppers are having trouble with momentum, but that’s probably to be expected given that they’re steppers controlling relatively large mirrors. Or maybe it’s due to twist in the connection between motor shaft and mirror? Check out the video after the break and let us know what you think.

Continue reading “Cheap Dual Mirror Laser Projector”

Licorice Launcher Locks On To Your Voice

As the red licorice wars rage on inextinguishably, it appears that Team Red Vines has a new advantage over Team Twizzlers—[TVMiller]’s voice activated, room-tracking, catapult-launching, magazine reloading Arduino licorice launcher.

Hacking and snacking often go hand in hand. They go together even better if you have a robot that can throw a tasty treat to you on command. That’s the dream behind this candy catapult. We’ve featured quite a few of [TVMiller]’s projects in the past, so we know he spends a lot of time hacking. So, how does this licorice launcher work to him keep going?

Continue reading “Licorice Launcher Locks On To Your Voice”

Filtering Noisy Data With An Arduino

One of the first frustrating situations a beginning microcontroller programmer will come across is the issue of debouncing switches. Microcontrollers are faster than switches, and the switch has yet to be built that can change state in zero time like they can on paper. This hurdle is easily overcome, but soon we are all faced with another issue: filtering noise from an analog signal. Luckily [Paul Martinsen] has put together a primer of three different ways to use an Arduino to filter signals.

The first (and fastest, simplest, etc.) way to filter an analog signal is to sample a bunch of times and then average all of the samples together. This will eliminate most outliers and chatter without losing much of the information. From there, the tutorial moves on to programming a running average to help increase the sample time (but consume much more memory). Finally, [Paul] takes a look at exponential filters, which are recursive, use less memory, and can be tweaked to respond to changes in different ways.

[Paul] discusses all of the perks and downsides of each method and provides examples for each as well. It’s worth checking out, whether you’re a seasoned veteran who might glean some nuance or you’re a beginner who hasn’t even encountered this problem yet. And if you’re still working on debouncing a digital input, we have you covered there, too.

Orbs Light To Billie Jean On This Huge Sequencer

Sequencers allow you to compose a melody just by drawing the notes onto a 2D grid, virtually turning anyone with a moderate feel for pitch and rhythm into an electronic music producer. For  [Yuvi Gerstein’s] large-scale grid MIDI sequencer GRIDI makes music making even more accessible.

Instead of buttons, GRIDI uses balls to set the notes. Once they’re placed in one of the dents in the large board, they will play a note the next time the cursor bar passes by. 256 RGB LEDs in the 16 x 16 ball grid array illuminate the balls in a certain color depending on the instrument assigned to them: Drum sounds are blue, bass is orange and melodies are purple.

Underneath the 2.80 x 1.65 meters (9.2 x 4.5 foot) CNC machined, sanded and color coated surface of the GRIDI, an Arduino Uno controls all the WS2812 LEDs and reads back the switches that are used to detect the balls. A host computer running Max/MSP synthesizes the ensemble. The result is the impressive, interactive, musical art installation you’re about to see in the following video. What better tune to try out first than that of Billie Jean whose lighted sidewalk made such an impression on the original music video.

Continue reading “Orbs Light To Billie Jean On This Huge Sequencer”

Code Craft – Embedding C++: Templates

The language C++ is big. There is no doubting that. One reason C++ is big is to allow flexibility in the technique used to solve a problem. If you have a really small system you can stick to procedural code encapsulated by classes. A project with a number of similar but slightly different entities might be best addressed through inheritance and polymorphism.

A third technique is using generics, which are implemented in C++ using templates. Templates have some similarities with #define macros but they are a great deal safer. The compiler does not see the code inserted by a macro until after it has been inserted into the source. If the code is bad the error messages can be very confusing since all the developer sees is the macro name. A template is checked for basic syntax errors by the compiler when it is first seen, and again later when the code is instantiated. That first step eliminates a lot of confusion since error messages appear at the location of the problem.

Continue reading “Code Craft – Embedding C++: Templates”