The Hack-a-Day logo challenge keeps on bearing fruit. This tip comes from [Enrico Lamperti] from Argentina who posted his follies as well as success creating a Hack-a-Day logo using a home built scanning laser projector.
The build consists of a couple small servos, a hacked up pen laser and an Arduino with some stored coordinates to draw out the image. As usual the first challenge is powering your external peripheral devices like servos. [Enrico] tackled this problem using 6 Ni-MH batteries and an LM2956 simple switcher power converter. The servos and Arduino get power directly from the battery pack and the Arduino controls the PWM signals to the servos as they trace out the stored coordinate data. The laser is connected to the servo assembly and is engaged and powered by an Arduino pin via an NPN transistor. He also incorporated a potentiometer to adjust the servo calibration point.
His first imported coordinate data generated from some Python script was not very successful. But later he used processing with an SVG file to process a click-made path the Arduino could use as map data to draw the Hack-a-Day logo. It requires a long exposure time to photograph the completed drawing in a dark room but the results are impressive.
It’s an excellent project where [Enrico] shares what he learned about using Servo.writeMicroseconds() instead of Servo.write() for performance along with several other tweaks. He also shared the BOM, Fritzing diagram, Processing Creator and Simulator tools and serial commands on GitHub. He wraps up with some options that he thinks would improve his device, and he requests any help others may want to provide for better performance. And if you want you could step it up a notch and create a laser video projector with an ATMega16 AVR microcontroller and some clever spinning tilted mirrors.
One of the benefits of plain text file format is that you can go in and edit them by hand. This is part of the KiCad board outline hack which [Clint] wrote about in a recent post. He wanted a unique board outline, which is something that KiCad isn’t necessarily well suited for. His solution was to create the outline as an image, then import it. If you’re wondering what custom shape is called for this type of work we’d like to point you to the (kind of) bottle opening HaDuino. That PCB layout was done on Eagle, which has a bit more leeway with special shapes.
Before getting to the code editing step seen above [Clint] used the built-in feature for KiCad that will turn an image into a component. He exported that code and altered it using a text editor in order to change the layer setting for the shape to that of the board outline. This took him from a plain old image, to a module which can be selected and dropped into the board editing program. It’s a snap to do this sort of thing for the copper layers too if you’re interested in using your mad graphics editing skills to layout an art piece on copper clad.
Using a jailbroken AppleTV, [David] was able to do a fair bit of detective work and found a way to enable the ‘Add Site’ option, which allowed him to use his Raspberry Pi as a media server. The good news: you don’t need to jailbreak if you’re running 5.2 or 5.3… you should be able to recreate his success fairly easily. The bad news: things seem to have changed in 6.0. [David] isn’t sure if this was Apple intentionally closing a hole, or just not dotting all of their i’s.
[David] put all of his research up on Github, including the rough code. If you haven’t updated your AppleTV yet, and you have a Raspberry Pi to use as a media server, give it a try and let us know how it goes in the comments.
[Rich Olson] really likes MakerWare and the Makerbot slicer – the software package that comes with every Makerbot – but sometimes he needs to change a few settings. Makerware doesn’t allow the user access to 90% of the setting for slicing and printing, so [Rich] did something about that. He came up with ProfTweak, a tool to change all the MakerWare slicing and printing parameters, giving him precise control over every print.
ProfTweak handles common settings changes such as turning the fan on or off, adjusting the filament diameter, changing feed rate options, and turning your infills into cats. It’s a handy GUI app that should work under Windows, OS X, and Linux, so if you’re running MakerWare right now, you can get up and running with this easily.
One thing [Rich] has been using his new software for is experimenting with alternative filaments. With his Makerbot, he’s able to print in nylon, the wood and stone PLAs, flex PLA, and PET. That’s a lot more material than what the Makerbot natively supports, so we have to give [Rich] some credit for that.
Our Chrome browser thinks it’s a Chromecast dongle. Here’s a screenshot of it playing a YouTube video. Note the tile banner and onscreen controls which are just like the ones you’d see on the actual hardware. Give it a try yourself by downloading the Leapcast Python package which [dz0ny] programmed.
After cloning the GitHub repo we had a few problems compiling the package. Turns out we needed to install python-dev and that took care of it. Starting the daemon is a simple command, we specified our Chrome binary path as well as added a few flags
leapcast --name HAD --chrome /usr/bin/google-chrome --fullscreen
Once that was running the Android YouTube app automatically detected Leapcast as a Chromecast device. It gave us a tutorial overlay mentioning the new share icon on the interface. Pressing that icon during playback launched an Incognito window which played the video. [dz0ny] links to a device config JSON file in the README. If you check it out you’ll notice that Netflix is listed as “external” while the others are not. This is because the Chromecast protocol uses a binary for Netflix. The others do it with local websockets or a cloud proxy so they work just fine with this setup.
This is a screenshot from the Atari 5200 version of the classic game Berserk. But the write-up we’re featuring actually looks at the original coin-op version. The maze for each level was established on the fly using a seed number fed into a rudimentary algorithm . Here’s a close look at how the maze building code actually worked.
Recently we saw a talk by Pitfall creator [David Crane] as part of our Retrotechtacular series. That is a real gem of programming history, and one of our favorite take-aways was that the levels were not hardcoded, but built using a random number generator algorithm with a hardcoded seed (so that the game was the same each time you played it). This uses a similar method but with a somewhat random seed.
The maze building was reverse engineered by observing the game in a MAME emulator, and by digging through disassembled code. Each time the code is “cold started” the seed starts out at zero, but from there the room number is used as the next seed. This is fed through a very simple algorithm. It generates directions for the walls, which use s few bit-wise operations to add the pillars inside the rooms.
It’s a great thing to study if you’re writing games for your embedded projects. By generating the room programmatically you don’t use up as much program memory. Of course these days even simple hobby controllers have way more storage to work with than [Alan McNeil] had when he designed Berserk.
Modern operating systems may seem baroque in their complexity, but nearly every one of them – except for Windows, natch – are based on the idea of simplicity and modularity. This is the lesson that UNIX taught us, explained perfectly in a little film from Bell Labs in 1982 starring giants of computation, [Dennis Ritchie], [Ken Thompson], [Brian Kernighan], and others.
At the time this film was made, UNIX had been around for about 10 years. In that time, it had moved far from an OS cloistered in giant mainframes attached to teletypes to slightly smaller minicomputers wired up to video terminals. Yes, smallish computers like the Apple II and the VIC-20 were around by this time, but they were toys compared to the hulking racks inside Bell Labs.
The film explains the core concept of UNIX by demonstrating modularity with a great example by [Brian Kernighan]. He took a short passage from a paper he wrote and found spelling errors by piping his paper though different commands from the shell. First the words in the paper were separated line by line, made lowercase, and sorted alphabetically. All the unique words were extracted from this list, and compared to a dictionary. A spell checker in one line of code, brought to you by the power of UNIX.