Wolfenstein in 600 Lines of Code

What’s more impressive, the fact that this Wolfenstein-like game is 600 lines of code, or that it’s written in AWK?

AWK is a language primarily used for text processing. But if you can write code the world bows to your wishes. [Fedor Kalugin] leverages the ability of a Linux terminal’s color options to draw his game. The 3D aspect is produced through ray-casting which generates a 2D image from 3D coordinates.

Trying out the game is extremely simple, install gawk, clone the repo, and play:

Continue reading “Wolfenstein in 600 Lines of Code”

Rehabbing an Historic Tool from Champion Blower and Forge Co.

Here’s a tale that warms our hearts. [Gord] is helping out the local living-history museum by rehabbing a historic woodworking tool that they want to add to their live demo woodshop. It’s a hundred-year-old manual drill press that has seen a ton of use.

acme-rod-tig-repairThere are three things that [Gord] has going for him. First off, the Champion Blower and Forge Co. built them to last. Second, he’s not really working on a deadline; the museum doesn’t need it back until May. And third, [Gord] has the tools he needs to do this right.

After cleaning and blasting [Gord] gets down to the really interesting repairs. First off, it wouldn’t be a drill press if someone hadn’t tried to drill through the table at some point. TIG welding filled it up and some milling brought it back. This same method was used again to make a beautiful custom replacement ACME rod. Throwing in a custom bushing replacement, turned wooden handle, and a several other fabricated parts, and [Gord] had the press working again. Check out the mechanism in the video below that shows the crank action turns the bit and a cam advances it through the work piece.

Continue reading “Rehabbing an Historic Tool from Champion Blower and Forge Co.”

Donuts of ShmooCon

This weekend is ShmooCon, a hacker convention held in Washington DC. Brian Benchoff and I will be there, both of us for the first time. We’d love your input on what talks look the most interesting. Check out the schedule of speakers, then leave a comment below to let us know which talks you think we should cover.

It’s great hearing the big presentations, but I find a lot of times great hacks can be found in smaller venues, or just by walking around. Two examples from 2015 DEF CON: the best talk I sat in on had about 10 people spectating in the IoT village, and I had a great time trying to track down everyone who had an unofficial hardware badge. If you’re at ShmooCon and have something to show off, please find us (@szczys, @bbenchoff)!

On Saturday join us for a Hackaday meetup in the lobby of the Washington Hilton. ShmooCon is well-regarded for the quality of its “lobby-con”, what better place to gather? Look for the Hackaday crowd starting Saturday 1/16 at 8:45am. We’ll bring the donuts, and some swag like Hackaday Omnibus Vol. 02 and of course, some Jolly Wrencher stickers.

LUX Searches in the Deep for Dark Matter

The Homestake Mine started yielding gold in 1876. If you had asked George Hearst, the operator at the time, if the mine would someday yield the secrets of the universe I bet he would have laughed you out of the room. But sure enough, by 1960 a laboratory deep in the mine started doing just that. Many experiments have been conducted there in the five and a half decades since. The Large Underground Xenon (LUX) experiment is one of them, and has been running is what is now called the Sanford Underground Research Facility (SURF) for about four years. LUX’s first round of data was collected in 2013, with the experiment and the rest of the data slated to conclude in 2016. The method, hardware, and results wrapped up in LUX are utterly fascinating.

Continue reading “LUX Searches in the Deep for Dark Matter”

Free Cell Data Transfer with Slowest Morse Code Ever

Readers of a certain age will remember the payphone trick of letting the phone ring once and then hanging up to get your quarter back. This technique was used with a pre-planned call time to let someone know you made it or you were okay without accruing the cost of a telephone call. As long as nobody answered you didn’t have to pay for the call, and that continues to be the case with some pay-per-minute cellphone plans.

This is the concept behind [Antonio Ospite’s] ringtone data transfer project called SaveMySugar. Don’t judge him, this work has been ongoing for around ten years and started back when cellphone minutes were a concern. We’re just excited to see that he got the excruciatingly slow thing to work.

Those wanting to dig down to the nitty-gritty of the protocol (and you should be one of them) will want to read through the main project page. The system works by dialing the cellphone, letting it ring once, then hanging up. The time between redials determines a Morse code dot, dash, or separation between characters. Because you can’t precisely determine how long it will take each connection to read, [Antonio] built ‘noise’ measurement into the system to normalize variations. The resulting data transfer works quite well. He was able to transfer the word “CODEX” in just six minutes and thirty seconds. But it is automatic, so what do you care? See the edge-of-your-seat-action play out in the video below.

If you can’t stomach that baud, here’s a faster Morse code data transmitter but it doesn’t use the phone.

Continue reading “Free Cell Data Transfer with Slowest Morse Code Ever”

SPI: Let Go and Use the Force

Take a leap the next time you use SPI and don’t poll for the busy flag. “What, are you crazy? That’s the whole point of the busy flag! It’s a quick check to make sure you don’t kill a byte waiting to be shifted out!” Sure, we thought the same thing, but the other side of the coin is that it takes time to check the busy flag, and that’s time he could be transmitting data. [bigjosh2] calculates that his technique saves 20% of those wasted cycles in this particular case. And he’s “using the force” only because he’s a Jedi master able to rely on the cycle count of a chunk of assembly code.

He’s working with an AVR processor, and pumping out bits to drive the vintage LED display pictured above. The ancient chips don’t have buffered SPI so he has to blank the display while shifting new data in to prevent it from glitching. Because the display blank during the SPI transmission, the slower it goes, the dimmer the lights.

He attacks the problem with synchronous code. It takes 2 cycles for the hardware SPI to send each bit, so he twiddles his thumbs (that’s exactly what he wrote in his code comments) for 16 cycles before reloading the SPI register with his next value. This leaves it up to faith in the silicon that the shifting will always take the same number of cycles, but the nice thing about hardware is that it’s deterministic. He ends up killing a few cycles in order to save time by not polling the busy flag.

Still need a crash course in what SPI actually does? [Bil Herd] has you covered with this SPI communication demo.

Drone Registration is just FAA Making You Read Their “EULA”

Over the last few weeks we’ve waded through the debate of Drone restrictions as the FAA announced, solicited comments, and finally put in place a registration system for Unmanned Aerial Systems (UAS). Having now had a week to look at the regulation, and longer to consider the philosophy behind it, I don’t think this is a bad thing. I think the FAA’s move is an early effort to get people to pay attention to what they’re doing.

The broad picture looks to me like a company trying to get users to actually read an End User Licensing Agreement. I’m going to put the blame for this firmly on Apple. They are the poster children for the unreadable EULA. Every time there is an update, you’re asked to read the document on your smartphone. You scroll down a bit and think it’s not that long, until you discover that it’s actually 47 pages. Nobody reads this, and years of indoctrination have made the click-through of accepting an EULA into a pop-culture reference. In fact, this entire paragraph has been moot. I’d bet 99 out of 103 readers knew the reference before I started the explanation.

So, we have a population of tech adopters who have been cultivated to forego reading any kind of rules that go with a product. Then we have technological advancement and business interests that have brought UAS to the feet of the general public both with low costs, wide availability, and pop-culture appeal. What could possibly go wrong? Let’s jump into that, then cover some of the other issues people are concerned about, like the public availability of personal info on the drone registry.

Continue reading “Drone Registration is just FAA Making You Read Their “EULA””