BootBasic Fits Your Favorite Language In The Boot Sector

Humans seem to have a need to do things that aren’t practical. Make the biggest ball of twine. Engrave the Declaration of Independence on a grain of rice. We want to make things bigger, smaller, faster, or whatever. That might explain why [nanochess] put out bootBASIC.

The 8088 (or later) assembly code gives you a very restricted BASIC interpreter that you can boot up. That means it has to fit in the 512-byte boot block that the hardware loads to get an operating system running. How restricted? Keep in mind it fits in 512 bytes. Each line can only have 19 characters or less. Backspace works, but doesn’t update the screen. Line numbers range from 1 to 999 and there are only 26 integer variables named a through z that hold 16 bits. All statements are in lower case.

Continue reading “BootBasic Fits Your Favorite Language In The Boot Sector” →

Add Scripting To Your C++ Programs With ChaiScript

If you are writing a program that has a technical user base, it is a nice touch to make the program scriptable. In fact, you might want to do the hard work in a programming language and then use your scripting language to build out features. In theory, this should be easy. There are plenty of embedded scripting libraries and they provide some way for your code to access script resources and for script resources to access selected host variables and functions. If you use C++, one of the easier ways to do this is with ChaiScript.

ChaiScript is BSD licensed and — assuming your compiler supports C++ 14 — it is as easy as including a header file and making a few calls. There are no special tools or libraries required. The code is portable between operating systems, including both 32-bit and 64-bit Windows. It is also threadsafe unless you turn that feature off.
Continue reading “Add Scripting To Your C++ Programs With ChaiScript” →

Deducing Stepper Motor Wiring

There are a lot of fun projects you can do with stepper motors salvaged from old printers or disk drives. However, it isn’t always clear how to connect to some strange motor with no markings or schematics. [Corvetteguy50] has a video showing his trick for working out the connections easily, and you can see it below.

The basic idea is simple. Using a special jig, he connects an LED across two random pins and spins the motor. If the LED lights, you’ve found a coil. You just don’t know which coil, yet. You can also short two wires and note when you feel resistance when you spin the shaft.

Continue reading “Deducing Stepper Motor Wiring” →

MQTT Deep Dive

If you read Hackaday, it is a good bet you’ve heard of MQTT — Message Queueing Telemetry Transport. If you’ve not used MQTT before, you should check out Ably’s [Kayla Matthews’] post entitled  MQTT: A Conceptual Deep Dive paper. She does mention their MQTT protocol connector at the end, and has a few notes about Ably’s products, but most of the post is a normal white paper and has a lot of good info.

MQTT’s claim to fame, of course, is that it is very tiny and is made to minimize power consumption compared to heavier-weight protocols. When you are trying to provide or consume data from a device that has to last a year on a coin cell, MQTT is your friend.

Continue reading “MQTT Deep Dive” →

Tea Bot Solves Another First World Problem

In the movie Wall-E, future humans live in floating chairs and have everything done for them. Today, we grumble if we have to go to physically find a light switch or a remote control. How far away can floating chairs with screens be? T2, the Tea Bot, gets us one step closer to that. Using a laser-cut frame, an ESP8266, and a servo motor, the T2 brews your tea for exactly the right amount of time.

We were kind of hoping the robot would at least dunk the tea bag in and out, but it does provide a web interface that lets you select the brew. Of course, the code is available, so you could make modifications — maybe turn on a hotplate underneath the cup.

Continue reading “Tea Bot Solves Another First World Problem” →

The Great Moon Hoax — No Not That One!

Humans first walked on the moon 50 years ago, yet there are some people who don’t think it happened. This story is not about them. It turns out there was another great conspiracy theory involving a well-known astronomer, unicorns, and humanoids with bat wings. This one came 134 years before the words “We chose to go to the moon” were uttered.

The 1835 affair — known as the Great Moon Hoax — took the form of six articles published in The Sun, a newspaper in New York City. Think of it like “War of the Worlds” but in newspaper form — reported as if true but completely made up. Although well-known astronomer John Herschel was named in the story, he wasn’t actually involved in the hoax. Richard Adams Locke was the reporter who invented the story. His main goal seemed to be to sell newspapers, but he also may have been poking fun at some of the more outlandish scientific claims of the day.

Continue reading “The Great Moon Hoax — No Not That One!” →

Hacking Shelters And Swimming Pools

How would you survive in a war-torn country, where bombs could potentially fall from the sky with only very short notice? And what if the bomb in question were The Bomb — a nuclear weapon? This concern is thankfully distant for most of us, but it wasn’t always so. Only 75 years ago, bombs were raining down on England, and until much more recently the threat of global thermonuclear war was encouraging school kids to “duck and cover”. How do you protect people in these situations?

The answers, naturally, depend on the conditions at hand. In Britain before the war, money was scarce and many houses didn’t have basements or yards that were large enough to build a family-sized bomb shelter in, and they had to improvise. In Cold War America, building bomb shelters ended up as a boon for the swimming pool construction industry. In both cases, bomb shelters proved to be a test of engineering ingenuity and DIY gumption, attempting to save lives in the face of difficult-to-quantify danger from above.

Continue reading “Hacking Shelters And Swimming Pools” →