A lot of people find scripting languages very productive and we’ve seen quite a few chips now supporting what you normally think of as a scripting language. These high-level abstraction languages are great, until they aren’t. When you need to go under the abstraction and do something complex or you need every cycle of performance, you might have to break your normal tools.
The Espruino is an ARM processor (an STM32) that has JavaScript on board. However, [Gordon Williams] shows how you can use peeks and pokes to access the hardware directly when the need arises. The names derive from another popular abstraction’s escape hatch. The old BASIC languages allowed direct memory access using keywords peek and poke. [Gordon] shows some examples of accessing the timer for PWM, and even looks at the STM32 reference manual to show how he knew where to peek and poke to begin with.
Since it’s launch way back in 2006, Twitter has become a magnet for techies. Maybe it’s the simple interface, maybe it’s the 140 character limit. Whatever the reason, you can find plenty of hackers, makers, and engineers tweeting about their daily activities. It didn’t take long for folks to start incorporating Twitter into their projects. Ladyada’s Tweet-a-watt is a great early example of this. This week’s Hacklet is all about some of the best tweeting projects on Hackaday.io!
We start with [Henry Conklin] and A Twitter account for my dog. [Henry’s] dog [Oliver] loves to bark and finding a solution became his entry to The Hackaday Prize. Rather than bring Cesar Millan in, [Henry] decided to embrace [Oliver’s] vocalizations by sending them up to the cloud. A Raspberry Pi with a USB microphone uses some custom Python code to detect barks and ruffs. The Pi then sends this data to Twitter using the python-twitter library. The Pi is connected to the internet via a USB WiFi dongle. You can see the results of [Henry’s] work on [Oliver’s] own Twitter page!
Next up is [troy.forster] and tweetie-pi. Rather than constantly check his phone or computer, [Troy] wanted a device to read his tweets. A bit of NodeJS code later, and tweetie-pi was born. A Raspberry Pi connected to the internet pulls data through the Twitter stream API. When tweets directed at a pre-configured username are found, the data is sent to a an Emic 2 text to speech module. The Emic reads in that classic DECtalker style voice we all know and love from the movies. [Troy] even added code to properly handle usernames and retweets.
[SirClover] joined the internet of things by creating Home automation system with Twitter, his entry in the 2014 Hackaday Prize. This home automation system is based around an Arduino Leonardo and an Ethernet shield. [SirClover] rolled his own custom PCB to handle relays, a Cds cell, and a 2×16 character LCD. The system can be accessed through a simple web interface. This allows the user to open or close blinds, turn on lights, all that great smart home stuff. Every time it executes a command, the home automation system reports status to Twitter.
Finally we have [Jakob Andrén] with A danceable notification cube, which is [Jakob’s] entry in the 2015 Hackaday Prize. The cube itself is a translucent box that contains a metric crapton of LEDs. 148 Neopixels and 12 3W power LEDs to be exact. All these LEDs are driven by a Teensy 3.1, which serves as the main processor for the entire system. The Teensy reads position data from an MPU6040 IMU. This allows it to change brightness and color as the box is moved around – or “danced”. An ESP8266 provides the cube with data from the interwebs, specifically Facebook and Twitter. The cube lights up and flashes whenever it receives a message.
If you want to see more tweeting projects, check out our new projects that tweet list. Did I miss your project? Don’t be shy, just drop me a message on Hackaday.io. That’s it for this week’s Hacklet, As always, see you next week. Same hack time, same hack channel, bringing you the best of Hackaday.io!
I’m here as a judge at the 2015 RedBull Creation Competition in Detroit — it’s a super intense 72 hour build off where makers, engineers, and artists can come to show us what they’ve got. This year’s theme is pretty broad: Serious Fun.
The event is at Recycle Here and is open to the public, so if you’re in the area, come check it out! A massive recycling depot warehouse has been temporarily transformed into a giant workshop. Teams have access to some serious tools including heavy duty welding equipment, industrial forming tools like pipe benders, brake presses, your standard drill presses, cutting equipment and of course laser cutters and 3D printers.
There are two competition categories — Open Class, which was free for anyone to join with a team, and Invite Only. The six Invite Only teams are working in the Recycle Here workshop, and the teams competing in the open category are scattered across the city, making use of their own workshops or hackerspaces. The theme was only just announced yesterday, and the 72 hour countdown has been ticking away ever since. I can’t wait to see what awesome interactive projects can be built in time to show off to the public this weekend.
LMR is possibly the most popular DIY robotics website around and was started up by a fun-loving Dane, [Frits Lyneborg]. It grew a large community around building up minimal robots that nonetheless had a lot of personality or pushed a new technical idea into the DIY robotics scene. [Frits] says that he hasn’t had time for DIY robotics for a while now, and doesn’t have the resources to run a gigantic web forum either, so he worked out a deal to let the Canadian hobbyist supply company Robot Shop take it over.
LMR has always been a little bit Wild-West, and many of the members quite opinionated, and that’s been part of its charm. So when the new corporate overlords came in, set up “Rules” (which have seemingly been downgraded to “suggestions”) and clarified the ownership of the content, some feathers were ruffled.
A few weeks later, everything looks to be settling back down again. (Edit: Or has it?!? See the comments below.) We wish LMR all the best — everyone loves robots, and LMR is a tremendous resource for the newbie interested in getting into DIY robotics on the cheap. More than a few LMR posts have been featured here at Hackaday over the years. Among our favorites are this drumming rover, a clever 3D printed gripper, and this wicked bicycle-style balancer.
We love interrupts in our microcontroller projects. If you aren’t already convinced, go read the first installment in this series where we covered the best aspects of interrupts.
But everything is not sunshine and daffodils. Interrupts take place outside of the normal program flow, and indeed preempt it. The microcontroller will put down whatever code it’s running and go off to run your ISR every time the triggering event happens. That power is great when you need it, but recall with Spider-Man’s mantra: With great power comes great responsibility. It’s your responsibility to design for the implicit high priority of ISRs, and to make sure that your main code can still get its work done in between interrupt calls.
Put another way, adding interrupts in your microcontroller code introduces issues of scheduling and prioritization that you didn’t have to deal with before. Let’s have a look at that aspect now, and we’ll put off the truly gruesome side-effects of using interrupts until next time.
Regular Hackaday readers are used to seeing the hacks that use a cheap USB TV dongle as a software defined radio (SDR). There’s plenty of software that will work with them including the excellent GNU Radio software. However, the hardware is pretty bare-bones. Without modifications, the USB dongle won’t get lower frequencies.
There’s been plenty of other SDR radios available but they’ve had a much heftier price tag. But we recently noticed the SDRPlay RSP, and they now have US distribution. The manufacturer says it will receive signals with 12-bits of resolution over the range of 100 kHz to 2 GHz with an 8MHz bandwidth. The USB cable supplies power and a connection to the PC. The best part? An open API that supports Windows, Linux, Mac, Android, and will even work on a Raspberry Pi (and has GNU Radio support, too).
For most of us, hacking is a hobby, a pleasant diversion from reality. Yes, a lot of us work on projects which have the potential to change the world – witness the 2015 Hackaday Prize semifinalist list. But in general, almost any of us could walk away from the shop at any time without dire consequences. Indeed, that’s the reason a lot of our work benches are littered with projects started with the best of intentions but left unfinished for lack of funds, lack of interest, or lack of time. We’re free to more or less willingly shelve a project and come back to it whenever we please, or not at all.
But not everyone has that luxury. For some people, hacking is much more than a hobby – it’s a means of survival. Sometimes people are thrown into situations where they have to cobble together a solution to an immediate problem with whatever is at hand, when the penalty for failure is much higher than a cluttered bench and a bruised ego. I’ve already covered one such case, where biohacked insulin saved hundreds of lives in occupied Shanghai in WWII.
In this occasional series I’ll explore historical cases where hacking really counted; cases where lives were saved or improved by a hack performed under desperate conditions.
A Bustle in the Hedgerow
Unsurprisingly, war offers a lot of opportunities for field expedient solutions under dire circumstances, and battlefield conditions might be the most extreme example of hacking when it counts.
In the early days of the Invasion of Normandy during WWII, Allied forces were having a difficult time dealing with the bocage terrain of northern France. A mixture of pasture and woodland, the Normandy bocage was a natural killing field for Allied tanks because the woodlands took the form of hedgerows – earthen dikes topped with thick tangles of brush. Hedgerows separated pastures and kept livestock controlled, but also made things tough on infantry and mechanized cavalry alike. Climbing the steep hedgerows exposed the vulnerable bottom hull of the tanks to enemy fire, and waiting for engineers to demolish the hedgerows with explosive made them sitting ducks for German artillery. The Allied advance was seriously hampered by the hedgerows, and both men and materiel were being winnowed down from fixed German positions chosen specifically to take advantage of the bocage terrain.
Enter Sgt. Curtis Grubb Culin III. Sgt. Culin, a tanker himself, was acutely aware of how vulnerable he was in his Sherman M4. The hedgerows were the problem, one apparently known to Allied command prior to the invasion for which no provision had been made. In the tradition of soldiers at the front of every battle throughout history, Sgt. Culin and his fellow tankers had to improvise a solution.
While kicking around ideas, one of the men suggested setting saw teeth on the front of a tank to cut through the hedgerows. He later attributed the comment to “A Tennessee hillbilly named Roberts”, and it was met with general laughter from the group as a crackpot scheme. But Sgt. Culin saw the potential in the idea, and began to develop it into a prototype.
Raw materials for his prototype were not hard to come by. Czech hedgehogs, giant anti-tank barriers made of crossed steel beams, still littered the Normandy beaches. The failed German defenses were harvested with a cutting torch and welded to the underside of a tank to form a series of “tusks” across the hull between the tracks. Equipped with these tusks, the tank could now blast through the tangled roots of the brush-covered earth of the hedgerow dykes.
When demonstrated for General Omar Bradley, he was impressed enough to order them built in quantity for the tanks. Eventually the prototype became an engineered product (dubbed the “Culin Rhino Device”) that was fitted to many tanks before being shipped over from England. Rhino-equipped tanks ripped across Normandy and shredded the German battle plan, which assumed the hedgerows would funnel Allied forces through heavily defended chokepoints.
Without Sgt. Culin’s battlefield hack, and his inspiration by a hillbilly named Roberts whom history otherwise forgets, the invasion of Europe might have taken a very different course. The fact that he did the hack while under fire makes it all the more impressive, and is a perfect example of hacking when it counts.
Know of any more examples of hacking when it counts? Send us a tip for use in a future Hacking When it Counts article.