The Android Bluetooth Connection

Suppose someone came to talk to you and said, “I need your help. I have a Raspberry Pi-based robot and I want to develop a custom Android app to control it.” If you are like me, you’ll think about having to get the Android developer tools updated, and you’ll wonder if you remember exactly how to sign a manifest. Not an appealing thought. Sure, you can buy things off the shelf that make it easier, but then it isn’t custom, and you have to accept how it works. But it turns out that for simple things, you can use an old Google Labs project that is, surprisingly, still active and works well: MIT’s App Inventor — which, unfortunately, should have the acronym AI, but I’ll just call it Inventor to avoid confusion.

What’s Inventor? It lives in your browser. You lay out a fake phone screen using drag and drop, much like you’d use QT Designer or Visual Basic. You can switch views and attach actions using a block language sort of like Scratch. You can debug in an emulator or on your live phone wirelessly. Then, when you are ready, you can drop an APK file ready for people to download. Do you prefer an iPhone? There’s some support for it, although that’s not as mature. In particular, it appears that you can’t easily share an iPhone app with others.

Is it perfect? No, there are some quirks. But it works well and, with a little patience, can make amazingly good apps. Are they as efficient as some handcrafted masterpiece? Probably not. Does it matter? Probably not. I think it gets a bad rep because of the colorful blocks. Surely it’s made for kids. Well, honestly, it is. But it does a fine job, and just like TinkerCad or Lego, it is simple enough for kids, but you can use it to do some pretty amazing things.

Continue reading “The Android Bluetooth Connection”

Picture By Paper Tape

The April 1926 issue of “Science and Invention” had a fascinating graphic. It explained, for the curious, how a photo of a rescue at sea could be in the New York papers almost immediately. It was the modern miracle of the wire photo. But how did the picture get from Plymouth, England, to New York so quickly? Today, that’s no big deal, but set your wayback machine to a century ago.

Of course, the answer is analog fax. But think about it. How would you create an analog fax machine in 1926? The graphic is quite telling. (Click on it to enlarge, you won’t be disappointed.)

If you are like us, when you first saw it you thought: “Oh, sure, paper tape.” But a little more reflection makes you realize that solves nothing. How do you actually scan the photo onto the paper tape, and how can you reconstitute it on the other side? The paper tape is clearly digital, right? How do you do an analog-to-digital converter in 1926? Continue reading “Picture By Paper Tape”

The Shady School

We can understand why shaderacademy.com chose that name over “the shady school,” but whatever they call it, if you are looking to brush up on graphics programming with GPUs, it might be just what you are looking for.

The website offers challenges that task you to draw various 2D and 3D graphics using code in your browser. Of course, this presupposes you have WebGPU enabled in your browser which means no Firefox or Safari. It looks like you can do some exercises without WebGPU, but the cool ones will need you to use a Chrome-style browser.

You can search by level of difficulty, so maybe start with “Intro” and try doing “the fragment shader.” You’ll notice they already provide some code for you along with a bit of explanation. It also shows you a picture of what you should draw and what you really drew. You get a percentage based on the matching. There’s also a visual diff that can show you what’s different about your picture from the reference picture.

We admit that one is pretty simple. Consider moving on to “Easy” with options like “two images blend,” for example. There are problems at every level of difficulty. Although there is a part for compute shaders, none seem to be available yet. Too bad, because that’s what we find most interesting. If you prefer a different approach, there are other tutorials out there.

Debugging The Instant Macropad

Last time, I showed you how to throw together a few modules and make a working macropad that could act like a keyboard or a mouse. My prototype was very simple, so there wasn’t much to debug. But what happens if you want to do something more complex? In this installment, I’ll show you how to add the obligatory blinking LED and, just to make it interesting, a custom macro key.

There is a way to print data from the keyboard, through the USB port, and into a program that knows how to listen for it. There are a few choices, but the qmk software can do it if you run it with the console argument.

The Plan

In theory, it is fairly easy to just add the console feature to the keyboard.json file:

{
...
    "features": {
        "mousekey": true,
        "extrakey": true,
        "nkro": false,
        "bootmagic": false,
        "console": true
    },
...

That allows the console to attach, but now you have to print.

Continue reading “Debugging The Instant Macropad”

Dead Bug Timer Relay Needs No PCB

We often marvel at the many things a 555 can do. But [Zafer Yildiz] shows us that it can even take the place of a PCB. You’ll see what we mean in the video below. The timer relay circuit is built “dead bug” style with the 555 leads bent out to provide wiring terminals.

Honestly, these kinds of circuits are fun, but we would be reticent to use this type of construction for anything that had to survive in the real world. Solder joints aren’t known for being mechanically stable, so this is good for experiments, but maybe not something you want to do all the time.

Continue reading “Dead Bug Timer Relay Needs No PCB”

RP2040 Assembly Language Mix And Match

[David] is building a project with an OLED, a keyboard, and an RP2040. He’s perfected a scanning routine in C to work with the keyboard, but he still had some places he wanted to use even lower-level instructions. That was as good an excuse as any to experiment with inline assembly language inside the C program.

The goal was to grab the keyboard’s input and stick it into a memory address register so the data at that address could be shown on the display. However, there was a complication because memory access of this type has to be word-aligned.

Sure, you could mask the low bits of the address, do the read, and then set an index to pick the specific byte, but assembly is easy, and it is good to know how to put it in your code, anyway.

Continue reading “RP2040 Assembly Language Mix And Match”

Wire Photo Fax Teardown

Fax machines had a moment in the sun, but they are actually much older than you might expect. Before the consumer-grade fax machines arrived, there was a thriving market for “wire photos” used by, for example, news organizations and the weather service. In the United States, the WEFax from Western Electric was fairly common and shows up on the surplus market. [Thomas] has an English unit, a Muirhead K-570B, that is very clearly not a consumer-oriented machine. His unit dates back to 1983, but it reminds us of many older designs. Check out his teardown in the video below.

The phone line connection on this device is a pair of banana jacks! There are even jacks for an external meter. Inside, the device is about what you’d expect for a 1983 build. PCBs with bare tinned conductors and lots of through-hole parts.

Continue reading “Wire Photo Fax Teardown”