Anyone who slings code for a living knows the feeling all too well: your code is running fine and dandy one minute, and the next minute is throwing exceptions. You’d swear on a stack of O’Reilly books that you didn’t change anything, but your program stubbornly refuses to agree. Stumped, you turn to the only one who understands you and pour your heart out to a little yellow rubber duck.
When it comes to debugging tools, this digital replacement for the duck on your desk might be even more helpful. Rubber duck decoding, where actually explaining aloud to an inanimate object how you think the code should run, really works. It’s basically a way to get you to see the mistake you made by explaining it to yourself; the duck or whatever – personally, I use a stuffed pig– is just along for the ride. [platisd] took the idea a step further and made his debugging buddy, which he dubs the “Dialectic Ball,” in the form of a Magic 8-Ball fortune teller. A 3D-printed shell has an ATtiny84, an accelerometer, and an LCD screen. To use it, you state your problem, shake it, and read the random suggestion that pops up. The list has some obvious suggestions, like adding diagnostic print statements or refactoring. Some tips are more personal, like talking to your local guru or getting a cup of coffee to get things going again. The list can be customized for your way of thinking. If nothing else, it’ll be a conversation piece on your desk.
If you’re more interested in prognostication than debugging, we have no shortage of Magic 8-Ball builds to choose from. Here’s one in a heart, one that fits in a business card, and even one that drops F-bombs.
Continue reading “Rubber Duck Debugging The Digital Way”
The PCB business card has long been a staple amongst the freelance EE set. It’s a way to show potential clients that you can do the job, as well as leave a great first impression. Some are simple blinkenlights devices, others have contact information on USB storage. We reckon that [Seamus] has really hit it out of the park with this one, though.
That’s right- this business card riffs on the classic Magic 8-ball toy. Ask a question, shake the card, and it’ll light an LED with the corresponding answer to your query. Use it as a desk toy, or break deadlocks in meetings by looking to the card for the correct course of action.
It’s a very tasteful build, showing off [Seamus]’s minimalist chops – consisting of just a decade counter, a tilt sensor, and some LEDs. When the card is shaken, the tilt sensor outputs a series of pulses to the clock line of the decade counter, whose outputs are the 8 LEDs. When the tilt sensor settles, it lands on the final answer.
We think it’s a great card, which shows off both fundamental technical skills as well as a certain flair and creativity which can be key to landing exciting projects. It doesn’t hurt that it’s good fun, to boot. For another take on the Magic 8-ball, check out this build that can give you a Yes/No answer on demand.
Just in time for Valentine’s Day, here’s a project out of the LVL1 hackerspace in Louisville that should warm the heart of that special someone in your life. Behold the Magic 8 of Hearts.
The metaphors are somewhat mixed here, what with the heart-shaped box, the mysterious black window of a Magic 8-ball, and the cheesy once-a-year sayings like those printed on Sweethearts candies. [JAC_101] began surgery by punching a hole in the plastic heart for an OLED display. The white on black display evokes the Magic 8-Ball look, although adding a blue filter would have nailed it. A 3-axis accelerometer detects shaking motion and an Arduino Nano selects a message to display. Some white LEDs light up the enclosure and add a little pizzazz. As a bonus, the whole thing is inductively charged – no extra holes needed in this heart.
If your true love would appreciate something a little flashier, try this animated LED Valentine heart. And if you’re successful in your romantic endeavors, you might just find yourself building these ultra-geeky wedding invitations.
Continue reading “Magic 8 Of Hearts Plies Your True Love With Cheesy Sayings”
Here’s a way to play around with simple computing concepts without going too crazy with the hardware side of things. [John Eisenmann] calls it the DUO tiny. It’s a programmable computer based around the ATtiny84. He wrote the operating system himself, building in a set of commands that make it quite functional, but allow the user to manipulate or even write the programs using the four button interface. Editing and running programs (which include some games) is demonstrated in the clip after the break.
The three major components used in the system are the ATtiny84, and EEPROM chip with 64 KB capacity to hold the programs, and the 102×64 pixel LCD screen seen above. The project began on a breadboard, but as he brought each part into being it transitioned to a strip-board prototype and finally this fab-house version.
Continue reading “Programmable Computer Built From A Humble ATtiny84”
[sjm4306] had a small Magic 8-Ball key chain as a kid. The fluid in this key chain eventually dried up, and if [sjm] is anything like us the 20-sided die is now lost to the sands of time or at the very least hidden in a box in the basement. After remembering the old Magic 8-Ball one day, [sjm] decided to build a digital version of everyone’s favorite bewitched billiard ball.
The digital magic 8-ball uses a PIC16f886; more than enough to hold the twenty possible replies from a real magic 8-ball. The display is a tin 3 cm OLED which surprisingly emulates the ‘icosahedron with raised letters floating in purple liquid’ aesthetic very well.
Right now, this is just a breadboard prototype – there isn’t an accelerometer or tilt switch in the build yet, so shaking the project does absolutely nothing. [sjm] may add that functionality later by turning his project into a watch, key chain, or installing it in a real Magic 8-Ball case.