A Tetris To Be Proud Of, With Only A Nano

Tetris may have first arrived in the West on machines such as the PC and Amiga, but its genesis at the hands of [Alexey Pajitnov] was on an Electronika 60, a Soviet clone of an early-1970s DEC PDP-11. Thus those tumbling blocks are hardly demanding in terms of processor power, and a game can be implemented on the humblest of hardware. Relatively modern silicon such as the Atmega328 in [c0pperdragon]’s Arduino Nano Tetris console should then have no problems, but to make that assumption is to miss the quality of the achievement.

In a typical home or desktop computer of the 1980s the processor would have been assisted by plenty of dedicated hardware, but since the Arduino has none of that the feat of creating the game with a 288p video signal having four gray scales and with four-channel music is an extremely impressive one. Beside the Nano there are only a few passive components, there are no CRT controllers or sound chips to be seen.

The entire device is packaged within a clone of a NES controller, with the passives on a piece of stripboard beside the Nano. There is a rudimentary resistor DAC to produce the grey scales, and the audio is not the direct PWM you might expect but a very simple DAC created by charging and discharging a capacitor at the video line frequency. The results can be seen and heard in the video below the break, and though we’re sure we’ve heard something like that tune before, it looks to be a very playable little game.

Continue reading “A Tetris To Be Proud Of, With Only A Nano”

The ZX Spectrum Next Arrives

Sinclair Research was best known in the United States for the tiny ZX80, and the ZX81, under its Timex branding. However, they also made the ZX Spectrum which had many features that were — at the time — unusual. A few years ago there was a Kickstarter to recreate a modern version of the Spectrum, and [Nostalgia Nerd’s] new ZX Spectrum Next has finally arrived. As you can see in the first part of the hour-long video he was very excited about it. Almost too excited for YouTube.

The new incarnation of the Spectrum claims to be fully compatible with the original but also offers improved graphics modes, SD cards instead of tape, and an optional 7 MHz clock speed. The 512K of RAM would have been sinfully luxurious back in the day when the original model came with 16K, although the most iconic Spectrums would be the 48K models. The new version even has the option of taking a Raspberry Pi Zero to act as an accelerator.

Continue reading “The ZX Spectrum Next Arrives”

Writing Arduino Libraries, An Expert View

The Arduino IDE has a bit of a split personality. On the one hand, it is a simple environment where you can just pick and choose a few libraries, write a few lines of code, and make lots of interesting things. On the other hand, it is also an ecosystem in which many different boards and libraries can be supported. Writing a great library that everyone can easily use takes a little forethought. There is an official style guide, but a recent post by [Nate] from Sparkfun points out lessons learned from writing more libraries than most people.

Of course, as you might expect, some of this is a matter of opinion, and [Nate] admits that. For example, they always use the serial port at 115,200 baud, but they do note that 9,600 baud is also popular. They also suggest making code as readable as possible, which is usually good advice. In the old days, writing terse code might lead to higher efficiency, but with modern compilers, you ought to get a tight final result even when doing things in a pretty verbose fashion.

Continue reading “Writing Arduino Libraries, An Expert View”

MIL-SPEC Keyboard Now Salutes USB

When [easyjo] picked up this late ’80s Marconi mil-spec keyboard for cheap, he knew it wouldn’t be easy to convert it to USB — just that it would be worth it. Spoiler alert: those LEDs aren’t a mod, they’re native. They get their interesting shape from the key traces, which are in the four corners.

Despite having way-cool buttons such as WPNS HOLD, and the fact that Control is on the home row where it belongs, this keyboard does not look fun to type on at all for any length of time. Of course, the point of this keyboard is not comfort, but a reliable input device that keeps out dust, sweat, liquids, and the enemy.

This is probably why the controller is embedded into the underside of the key switch PCB instead of living on its own board.  [easyjo] tried to analyze the signals from the existing 26-pin connector, but it didn’t work out.

So once he was able to decode the matrix, he removed the controller chip and wired the rows and columns directly to an Arduino Leonardo. Fortunately, the LEDs were just a matter of powering their columns from the front side of the board.

The availability of certain kinds of military surplus can make for really interesting modernization projects, like adding POTS to a field telephone.

Via r/duino

RC Ground Effect Vehicle Skims Over The Water

In the 1960s the Soviet Union began experimenting with what they called ekranoplans, ground effect vehicles (GEVs) that were something of a hybrid between a ship and a large airplane. Their stubby wings didn’t provide enough lift for the vehicle to fly in the traditional sense, the craft essentially rode on a cushion of pressurized air produced by the aerodynamic interaction between the wings and the surface of the water. But after decades of testing, the ekranoplan never became much more than a curiosity for American intelligence agencies to ponder over.

Now [Peter Sripol] has built his own version of what the CIA dubbed the “Caspian Sea Monster”, and judging by the video of him “flying” it around a lake, the design seems to tick all the boxes. The advantage of a GEV is that it’s far faster than a ship and more fuel efficient than an aircraft of similar size. They also operate low enough to avoid enemy radar, which made them very appealing for military applications. Not that any of those characteristics apply to an RC vehicle, but at least it looks cool.

Ironically, it took some extra effort for [Peter] to keep his scratch built ekranoplan from getting airborne. Built out of foam covered with aluminum tape, the craft was light enough that even the tiny wings were enough to break it free from the ground effect if it got going fast enough. It didn’t help that the electric ducted fan motors used were probably a bit too powerful as well.

But by carefully adjusting the throttle and control surfaces, [Peter] was able to keep his craft firmly planted in the ground effect most of the time. Seeing the large RC craft floating just a few inches over the water is very impressive, and thanks to the application of some Soviet-style iconography on its burnished aluminum body, it looks like found-footage from a Cold War test program.

Hackaday readers will likely be familiar with [Peter] and his exploits. From building his own human-scale airplane out of foam board to convincing a cordless drill that it can fly, he’s creations have never been overly concerned with the status quo.

Continue reading “RC Ground Effect Vehicle Skims Over The Water”

Raspberry Pi 4 Offers Up 2 GB For The Price Of One

The Raspberry Pi 4 represents a significant performance increase over previous generations, unlocking potential applications that were simply beyond the abilities of these diminutive Single Board Computers (SBCs) in the past. Some would even argue that the Pi 4, with a quad-core Cortex-A72 running at 1.5 GHz, now holds its own as a lightweight ARM desktop computer for those interested in finally breaking free from x86.

In light of the considerable upgrade in processing power, the choice to outfit the base model Pi 4 with just 1 GB of RAM always seemed a bit odd. So it’s little surprise that the Raspberry Pi Foundation has decided to shift things around and lower the price of the 2 GB model to the traditional $35. In a blog post this morning, Eben Upton said that with RAM prices falling over the last year, the company thought it was time they passed the savings onto the customer.

This change comes just two days before the Pi’s 8th birthday. There has been speculation that the Pi 4 is capable of operating with 8 GB of RAM and unveiling that news to coincide with this anniversary would have been a clever marketing move. Alas, it looks like we’ll have to continue to wait.

For those who are invested in the 1 GB model, have no fear. Rather than delete the product from the lineup entirely, the company will be keeping it available for anyone who needs it. So if you’ve got a commercial or industrial application that might not take kindly to the hardware getting switched out, you’ll still have a source of spares. That said, the pricing for the 1 GB model won’t be changing, so there’s no cost advantage to using it in new designs.

Combined with news that compatibility issues the Pi 4 had with generic USB-C power supplies was fixed with an under the radar board revision, it seems there’s never been a better time to upgrade to the latest and greatest version of everyone’s favorite Linux board. Happy Birthday, Raspberry Pi.

Hands-On: Smarty Cat Is Junior’s First Slide Rule

You may remember that I collect slide rules. If you don’t, it probably doesn’t surprise you. I have a large number of what I think of as normal slide rules. I also have the less common circular and cylindrical slide rules. But I recently picked up a real oddity that I had to share: the Smarty Cat. It isn’t exactly a slide rule but it sort of is if you stretch the definition a bit.

Real Slide Rules

A regular slide rule takes advantage of the fact that you can multiply and divide by adding logarithms. Imagine having two rulers marked in inches or centimeters — it doesn’t matter (see the adjoining image). Suppose you want to add 5 and 3. You count off 5 marks on one ruler and line it with up the zero inch mark on the other ruler. Now you count off 3 marks on the second ruler and that position on the first ruler will indicate the result. Here it lines up with the 8 mark, which is, of course, the correct answer.

That’s a simple addition. But if you can convert your numbers into logarithms, add the logarithms, and then back out to a regular number, you can multiply.

Continue reading “Hands-On: Smarty Cat Is Junior’s First Slide Rule”