Etch-A-Snap Will Sketch Your Selfies

The Etch-a-Sketch was a hugely popular toy in the days before video games and the Internet became ubiquitous. These days, they’re a fun amusement, but can still be difficult to master. Rather than learn the necessary skills himself, [Martin Fitzpatrick] decided to build a machine to draw for him. Enter the Etch-a-Snap.

The build starts with a Raspberry Pi Zero, equipped with the requisite camera. Images taken are processed into a 100×60 pixel image with 1-bit color. At this stage, a network graph representation is built of the image and used to generate commands for the plotting mechanism to draw the scene. Plotting is achieved with stepper motors that turn the knobs through 3D-printed gears. Plotting is slow, with images taking 15 minutes to an hour to “develop”. The system can also be used to draw manually processed images, which can improve results when images are chosen carefully.

It’s a project that combines modern hardware with a classic toy for some interactive fun. We could imagine a large-scale version of this being a great installation at a science museum or MakerFaire. We’ve seen others tackle a computer-controlled Etch-A-Sketch, too. Video after the break.

Continue reading “Etch-A-Snap Will Sketch Your Selfies”

Automated Tuning Of Linux Audio

Audio systems in Linux are terrible. You’ve never known true pain until you’ve tried to set up a recording or broadcasting workstation running Linux. I did, twenty years ago, and nothing has changed since. This wasn’t really a problem when Linux was either used in server spaces or some nerd’s battle station, but now we have small single board computers that everyone uses and wants to turn into a modular synth. Welcome to paintown, because the Linux audio stack is terrible.

For the past ten years, [Dynobot] has been working on improving audio in Linux. This is a decade of reading manuals from IBM and Oracle, and a deep knowledge of how to adjust settings so audio actually works. All of this work is now combined into a single script that improves everything. This means the priority of the Audio group is changed, the thread priority is better, the latency is better, and for anyone who wants to set up a local streaming service, the network latency is better. It’s not everything, and there’s no mention of recording multitrack audio, but we’ll accept the baby steps here.

There are two relevant Github repositories for this, the first containing audio adjustments for Debian-based systems, including the Raspberry Pi. This should work on any single board computer running Debian, and has been tested on all the Raspberry Pis, the Allo Sparky, ASUS Tinkerboard, and the Odroid C2. There’s also a version for TinyCore-based Linux systems that improves the priority of the audio threads, changes the thread scheduling from ‘whatever’ to FIFO, and improves the latency. If you’re running Linux, and you’re doing something with audio, this is what you need.

Portable Pi Power Pack Makes For Petite Projects

Since the Pi Zero was released, there have been many attempts to add a power bank. Cell phone batteries are about the same size as a Pi Zero, after all, and adding a USB charging port and soldering a few wires to a Pi is easy. The PiSugar is perhaps the cutest battery pack we’ve seen for the Pi Zero, and it comes in a variety of Hats compatible with the Pi, capable of becoming a small display, a keyboard, or any other thing where a small, portable Linux machine is useful.

The core of this build is a small circuit board the size of a Pi Zero. Attached to this board is a 900mAh battery, and the entire assembly is attached to the Pi Zero with a set of two spring clips that match up with with a pair of pads on the back of the Pi. Screw both of these boards together, and you have a perfect, cableless solution to adding power to a Pi Zero.

But the PiSugar doesn’t stop there. There are also cases, for a 1.3 inch LCD top, a 2.13 inch ePaper display, an OLED display, a camera, a 4G module, and something that just presents the pins from the Pi GPIO header. This is an entire platform, and if you print these parts in white plastic, they look like tiny little sugar cubes filled to the brim with electronics and Linux goodness.

Yes, you’ve seen 3D printed Pi cases before, but nothing in the way of an entire platform that gives you a Pi Zero in an extensible platform that can fit in your pocket and looks like sweet, sweet cubes of sucrose.

Give Your Raspberry Pi SD Card A Break: Log To RAM

The fragility of SD cards is the weak link in the Raspberry Pi ecosystem. Most of us seem to have at least one Pi tucked away somewhere, running a Magic Mirror, driving security cameras, or even taking care of a media library. But chances are, that Pi is writing lots and lots of log files. Logging is good — it helps when tracking down issues — but uncontrolled logging can lead to problems down the road with the Pi’s SD card.

[Erich Styger] has a neat way to avoid SD card logging issues on Raspberry Pi, he calls it a solution to reduce “thrashing” of the SD card. The problem is that flash memory segments wear out after a fairly low number of erase cycles, and the SD card’s wear-leveling algorithm will eventually cordon off enough of the card to cause file system issues. His “Log2Ram” is a simple Unix shell script that sets up a mount point for logging in RAM rather than on the SD card.

The idea is that any application or service sending log entries to /var/log will actually be writing them to virtual log files, which won’t rack up any activity on the SD card. Every hour, a cron job sweeps the virtual logs out to the SD card, greatly reducing its wear. There’s still a chance to lose logging data before it’s swept to disk, but if you have relatively stable system it’s a small price to pay for the long-term health of a Pi that’s out of sight and out of mind.

One thing we really like about [Erich]’s project is that it’s a great example of shell scripting and Linux admin concepts. If you need more information on such things, check out [Al Williams’] Linux-Fu series. It goes back quite a way, so settle in for some good binge reading.

Farming Items With RasPi-Modified Joycons

The Pokémon games have delighted legions of Nintendo gamers over the years, and show no signs of slowing down any time soon. Despite its popularity, there are certain aspects of the games that are unarguably about simply grinding your way to success. For [Mori Bellamy], this simply wouldn’t do – yet their thirst for gold bottlecaps was insatiable. What to do? Automate it, of course.

The first step was to hack the Joycons from the Nintendo Switch. A DG333A analog switch IC was hooked up to the buttons inside, and controlled by the GPIO pins of a Raspberry PI. The joystick was then controlled with an MCP4725 DAC, allowing the system to fully emulate control inputs to the console.

With the console now under control by the Raspberry Pi, the next step was to add intelligence. Google’s Tesseract OCR platform was combined with a helping of Python code. This allows the script to read dialog boxes from the game, and use this data to determine which buttons to press to farm items.

[Mori] has provided the code on GitHub for others to use, noting that it should be generalizable to other games with a little work. Fundamentally, the underlying hardware could readily be repurposed to other controllers, too. There’s plenty of other ways to automate the drudgery of gaming, even if you have to use a touch screen. Video after the break.

Continue reading “Farming Items With RasPi-Modified Joycons”

Hackaday Links Column Banner

Hackaday Links: March 31, 2019

You can now make flexible circuit boards of unlimited length. Trackwise was contracted out for making a wiring harness for the wing of a UAV and managed to ship a 26 meter long flexible printed circuit board. This is an interesting application of the technology — UAVs are very weight sensitive and wiring harnesses are heavy. Wings are straight, but they flex, and you need wires going from tip to tip. Flex circuits do all of this well, but first you need a technology that allows you to manufacture circuits that are as long as a wing. This is apparently something called ‘reel-to-reel’ technology, or some variant of continuous production. Either way, it’s cool, and we’re wondering what else this kind of circuit enables.

You may have noticed a few odd-shaped buildings going up in the last few years. These are buildings designed for indoor skydiving. Two went up around DC in the last year or so. What if you didn’t need a building? What if you could make an outdoor, vertical wind tunnel? Here you go, it’s the Aerodium Peryton.

KiCon, the first and largest gathering of hardware developers using KiCad, is happening April 26th in Chicago.

If KiCad isn’t your thing, PyCon is in Cleveland May 1-9. It couldn’t come at a better time: after losing LeBron, the Cleveland economy has plummeted 90%. Cleveland needs an industry now, and tech conferences are where it’s at. Go Browns.

For one reason or another, a few tech blogs wrote about a product on Tindie last week. It’s the SnapOnAir Raspberry Pi Zero PCB. This turns a Raspberry Pi Zero into a tiny, battery-powered handheld computer with a keyboard and display. This is just a PCB, and you’ll need to bring your own switches, display, and other various modules, but it is a compact device and if you need a small, handheld Linux thing, this is a pretty good solution.

Oh noes April Fools is tomorrow, which means the Internet will be terrible. Tip ‘o the hat to Redbox, though: they were the only one that sent out a press release to their waste of electrons by last Friday.

 

A Weather Station Fit For A PDP-11

The Digital Equipment Corp. PDP-11/70 is a masterpiece of Cold War-era industrial design. This microcomputer was the size of one or two modern server racks depending on configuration, and the front panel, loaded up with blinkenlights, was clad in a beautiful rose and magenta color scheme. The switches — the ones you used to toggle bits in memory — were actually custom designed covers made to match the shape of the completely unnecessary bezel. The aesthetic of the 11/70 is the intersection of baroque and modernism on the design Venn diagram.

[Oscar Vermeulen] built a miniature version of the PDP-11/70 that houses a Raspberry Pi, and [rricharz] has been hard at work bringing an original copy of BSD to this system. The first great project to come out of this effort? It’s a weather station, and it’s exactly as cool as you think it is.

A bit of ground work went into this build, including getting a historical Unix system up and running, in this case 2.11 BSD. Armed with a Pi and the PiDP-11/70 front panel, [rricharz] had a complete BSD system up and running, and with cool-retro-term, the interface looked the part. Doing something useful was another question entirely, but the Pi in the PiDP had some GPIOs free, so this ancient machine got an I2C temperature and pressure sensor.

The completed build is basically just a breadboard, a tiny diagnostic OLED, and a python script that grabs the data and sends it over to the sim. This is pressure and temperature data shoved into an emulation of a Tektronix 4010 terminal. It’s marginally useful work done by an ancient BSD system wrapped in an emulation on a Raspberry Pi. It doesn’t get better than that.