Combat Gets A Computer Controlled Opponent

If you ever spent some time playing on the Atari 2600, there’s an excellent chance you went through a few rounds of Combat. The two-player warfare game not only came with the console but was actually one of the more technically impressive titles for the system, offering nearly 30 variations of the core head-to-head gameplay formula.

But unfortunately, none of those modes included single player. That is, until [Nick Bild] got on the case. While some concessions had to be made, he has succeeded where the original developers failed, and added a computer-controlled enemy to Combat. What’s more, the game still runs on the stock 2600 hardware — no emulator tricks required. The true aficionados can marvel at the snippets of source code he’s provided, but the rest of us can just watch the video below the break and marvel at the accomplishment.

If you’ve never worked on such a constrained system, this might not seem like a big deal. But [Nick] does a great job of explaining not just what he did, but why it was so hard to pull off in the first place. For example, the console has no video buffer, so everything needs to be done during the VBLANK period where the game doesn’t need to be drawing to the screen. Unfortunately that didn’t give him enough free cycles, so he had to split his code up to run across three frames instead of just one. That mean’s the original game logic is now only running 27 frames out of the 30 per second, but he says you can’t really tell in practice.

That said, some cuts had to be made. He needed to remove the surprisingly complex engine sounds to free up some resources, and had to bump the 2 KB cartridge up to 4 KB to hold the new code and data. Turns out the 2600 could handle far larger cartridges via bank switching though, so this wasn’t actually a problem.

Given its age and limited capabilities compared to more modern consoles, you might think the Atari 2600 would be little more than a footnote in gaming history. But there’s a devoted group of folks who enjoy squeezing everything they can out of the system’s 45-year-old hardware which leads to labors of love like this one.

Continue reading Combat Gets A Computer Controlled Opponent”

Never Too Rich Or Thin: Compress Sqlite 80%

We are big fans of using SQLite for anything of even moderate complexity where you might otherwise use a file. The advantages are numerous, but sometimes you want to be lean on file storage. [Phiresky] has a great answer to that: the sqlite-zstd extension offers transparent row-level compression for SQLite.

There are other options, of course, but as the post mentions, each of these have some drawbacks. However, by compressing each row of a table, you can retain random access without some of the drawbacks of other methods.

Continue reading “Never Too Rich Or Thin: Compress Sqlite 80%”

OpenDendrometer Can Measure How Your Tree Feels

There are various ways to measure plant health, and we’ve seen many projects creating open-source solutions. One we haven’t seen is a dendrometer, which involves measuring various physical dimensions of trees to track their health and growth. [John Opsahl] is changing this with the OpenDendrometer, a tool for tracking the diameter of tree limbs and fruit.

Tiny changes in diameter take place throughout the day, and tracking these changes allows deviations to be detected, which can be a sign of water stress. Over weeks and months, these measurements can be used to measure growth and fruits’ progress to harvest. [John] found that a digital tire tread depth gauge can work well for this application. Many of these gauges use the same electronics as the cheap digital calipers, for which the serial protocol was reverse engineered more than a decade ago. The OpenDendrometer connects the tire depth gauge to a microcontroller via a 1.5V level shifter, which logs measurements to an SD card while using a DS3231 RTC for accurate timestamps. The RTC can also be used to wake up the circuit at the required intervals to save battery power. For the initial proof of concept [John] is using an Arduino Pro Mini, but plans to move to an ESP32 at a later stage to allow wireless data transmission.

Everything will be housed in a 3D printed enclosure with a foam cord gasket to make the device weather resistant. A mounting rod on the outside of the enclosure with adjustable thumbscrews allows the OpenDendrometer to be attached to any part of the tree. We plan to keep an eye on this project and look forward to seeing the data it produces.

For the other ways of measuring plant health, we’ve covered everything from soil moisture to Normalized Difference Vegetation Index and even plant weight and even pot plant weight.

Simple Propulsion For The Lazy Paddle Boarder

One of the downsides to healthy outdoor activities is all the exercise. Who would want to do that if you can build something to do the hard work for you? That seems to be the theme of [Bitluni]’s latest build, a simple (and hacky) propulsion system for a stand-up paddleboard.

After acquiring an inflatable stand-up paddleboard and trying it out a few times, [Bitluni] decided to skip the “stand up” and “paddle” parts. He designed and printed a very simple propeller, which he intended to power with a brushless motor and speed controller. In the process of drilling out the prop to fit the shaft, he realized he was overcomplicating things. So he decided to just use his battery-powered drill instead. For the shaft tube, he modified an old crutch by drilling a hole in the handle for the shaft and adding a duct with a bearing on the other end. He also attached a carabiner to the handle to fix it to the paddleboard.

A test at a lake showed that the propulsion system performed relatively well for a proof of concept but had some flaws. To submerge it properly, [Bitluni] had to sit on the rear of the paddleboard facing backward. If it was too close to the surface, it would suck air and lose thrust, or spray him and his drill with water. Of course, there is also the real risk of drowning his drill in the process.

Projects don’t need to be complex to be enjoyable, and you can often learn more by quickly creating a proof of concept instead of taking forever to come up with the “perfect” design.

If you want to see some more advanced water-borne projects, check out the waterjet-powered electric surfboards built by [RCLifeOn] and [Andrew W].

Continue reading “Simple Propulsion For The Lazy Paddle Boarder”

Scavenging CDs For Flexible Parts

CDs are becoming largely obsolete now, thanks to the speed of the internet and the reliability and low costs of other storage media. To help keep all of this plastic out of the landfills, many have been attempting to find uses for these old discs. One of the more intriguing methods of reprurposing CDs was recently published in Nature, which details a process to harvest and produce flexible biosensors from them.

The process involves exposing the CD to acetone for 90 seconds to loosen the material, then transferring the reflective layer to a plastic tape. From there, various cutting tools can be used to create the correct pattern for the substrate of the biosensor. This has been shown to be a much more cost-effective method to produce this type of material when compared to modern production methods, and can also be performed with readily available parts and supplies as well.

The only downside to this method is that it was only tested out on CDs which used gold as the conducting layer. The much more common aluminum discs were not tested, but it could be possible with some additional research. So, if you have a bunch of CD-Rs laying around, you’re going to need to find something else to do with those instead.

Thanks to [shinwachi] for the tip!

Ask Hackaday: What Was Your First Electronics Win?

Back in high school, I joined the stage crew — because of course I did. As student theater groups go, it was pretty active, and with two shows to produce each year, there was always a lot of work to do. I gravitated to the lighting crew, which was a natural fit for me. Besides the electrical part of the job, there was also a lot of monkeying around on scaffolding and rickety ladders to hang the lights, which was great fun for the young and immortal. Plus there was the lighting console to run during performances, a job I eventually took over for my last two years.

Unfortunately, the lighting system was a bit pathetic. The console was mounted in the stage right wings, rather than out in the front of the house where a sensible person would put it. And despite being only about ten years old, the dimmers were already starting to fail. The board had about 20 channels, but you could always count on one of the channels failing, sometimes during a show, requiring some heroics to repatch the lights into one of the dimmers we always left as a spare, just for the purpose.

Continue reading “Ask Hackaday: What Was Your First Electronics Win?”

R2Home Is Ready To Bring Back Your High Altitude Payload

With high-altitude ballooning, you are at the mercy of the winds, which can move your payload hundreds of kilometers and deposit it in some inaccessible spot. To solve this [Yohan Hadji] created R2Home, an autonomous parachute-based recovery system that can fly a payload to any specified landing site within its gliding range.

We first covered R2Home at the start of 2021, when he was still in the early experimental phases, but the project has matured massively since then. It just completed its longest and highest test flight. Descending autonomously from a release altitude of 3500 m, with an additional radiosonde payload, it landed within 5 m of the launch point.

R2Home electronics with it's insulated enclosure
R2Home electronics with its insulated enclosure

R2Home can fly using a variety of steerable canopies, even a DIY ram-air parachute, as demonstrated in an earlier version. [Yohan] is currently using a high-performance wing for RC paragliders.

A lot of effort went into developing a reliable parachute deployment system. The main canopy is packed carefully in a custom “Dbag”, which is attached to a drogue chute to stabilize the system during free-fall and deploy the main canopy at a preset altitude. This is done with a servo operated release mechanism, while steering is handled by a pair of modified winch servos intended for RC sailboats.

All the electronics are mounted on a stack of circular 3D printed brackets which fit in a tubular housing, bolted together with threaded rods. With the help of a design student [Yohan] also upgraded the simple tube housing to a lockable, foam-insulated design to help it handle temperatures at high altitudes.

The flight main flight computer is a Teensy 4.1  plugged into a custom PCB to connect all the navigation, communication, and flight systems. The custom Arduino-based autopilot takes inputs from a GPS receiver, and pilots the system to the desired drop zone, which it circles until touchdown.

The entire project is extremely well documented, and all the design files and code are open source and available on Github. Continue reading “R2Home Is Ready To Bring Back Your High Altitude Payload”