A Serial Mouse For A Homebrew 8-bit Computer

[Too Many Wires] has a custom computer he’s building. He wanted a mouse, but USB is a bit of a stretch for the fledgling computer. We might have opted for PS/2, but he went for something even older: a serial mouse connected with a DE-9 (colloquially, a DB-9). Check it out in his recent video update on the project below.

Don’t remember serial mice? They were very common many years ago, and apparently, you can still buy new ones, which makes you wonder what people are doing with them. If you are an old hand at serial, you’ll immediately know why he couldn’t get it to work at first. If you haven’t worked with RS-232 gear before, you’ll learn a lot.

The protocol is simple enough, and you can read the code or find plenty of old documents. He’s using a UART chip, which offloads the CPU. However, the PS/2 mice are very easy to work with directly, and you could skip the +/- 12V RS-232 and other issues.

Either way, however, using an RS-232 or PS/2 mouse in a project is relatively straightforward. You might not think you need a mouse, but don’t forget, they are really accurate two-axis sensors. An optical mouse on a motion table, for example, could be worth something.

The computer is based on [Ben Eater]’s design, if you want more details on that. Can’t decide between RS-232 and PS/2? You don’t have to.

Continue reading “A Serial Mouse For A Homebrew 8-bit Computer”

The Android Linux Commander

Last time, I described how to write a simple Android app and get it talking to your code on Linux. So, of course, we need an example. Since I’ve been on something of a macropad kick lately, I decided to write a toolkit for building your own macropad using App Inventor and any sort of Linux tools you like.

I mentioned there is a server. I wrote some very basic code to exchange data with the Android device on the Linux side. The protocol is simple:

  • All messages to the ordinary Linux start with >
  • All messages to the Android device start with <
  • All messages end with a carriage return

Security

You can build the server so that it can execute arbitrary commands. Since some people will doubtlessly be upset about that, the server can also have a restrictive set of numbered commands. You can also allow those commands to take arguments or disallow them, but you have to rebuild the server with your options set.

There is a handshake at the start of communications where Android sends “>.” and the server responds “<.” to allow synchronization and any resetting to occur. Sending “>#x” runs a numbered command (where x is an integer) which could have arguments like “>#20~/todo.txt” for example, or, with no arguments, “>#20” if you just want to run the command.

If the server allows it, you can also just send an entire command line using “>>” as in: “>>vi ~/todo.txt” to start a vi session.

Continue reading “The Android Linux Commander”

Open source mute button

Silent No More: Open-Source Fix For Mic Mishaps

“Sorry, my mic was muted…” With the rise of video calls, we’ve all found ourselves rushing to mute or unmute our mics in the midst of a call. This open-source Mute Button, sent in by [blackdevice], aims to take out the uncertainty and make toggling your mic easy.

It’s centered around a small PIC32MM microcontroller that handles the USB communications, controls the three built-in RGB LEDs, and reads the inputs from the encoder mounted to the center of this small device. The button knob combo is small enough to easily move around your desk, yet large enough to toggle without fuss when it’s your turn to talk.

To utilize all the functions of the button, you’ll need to install the Python-based driver on your machine. Doing so will let you not only toggle your microphone and volume, but it will also allow the button to light up to get your attention should you be trying to talk with the mic muted.

Although small, it’s also quite rugged, knowing it will spend its life being treated much like a game of Whac-A-Mole—slapped whenever needed. The case is designed to be 3D printed by any FDM printer, with the top knob section printed in translucent material to make the notification light clearly visible.

All of the design files, firmware, and parts list are available over on [blackdevices]’s GitHub page, and they are open-source, allowing you to tweak the design to fit your unique needs. Thank you for sending in this well-documented project, [blackdevices]; we look forward to seeing future work. If you like this type of thing, be sure to check out some of our other cool featured desk gadgets.

Continue reading “Silent No More: Open-Source Fix For Mic Mishaps”

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”

Pinout of 74HC595

Using The 74HC595 Shift Register To Drive 7-Segment Displays

In a recent video our hacker [Electronic Wizard] introduces the 74HC595 shift register and explains how to use it to drive 7-segment displays.

[Electronic Wizard] explains that understanding how to apply the 74HC595 can increase the quality of your projects and also help keep the demands on the number of pins from your microcontroller to manageable levels. If you’re interested in the gory details you can find a PDF datasheet for the 74HC595 such as this one from Texas Instruments.

[Electronic Wizard] explains further that a shift register is like a small one byte memory where its data is directly available on its eight output pins, no input address required. When you pulse the clock pin (CLK) each bit in the eight bit memory shifts right one bit, making room for a new bit on the left. The bits that fall off the right hand side can daisy chain into another 74HC595 going out on pin 9 and coming in on pin 14.

Continue reading “Using The 74HC595 Shift Register To Drive 7-Segment Displays”

Instant Macropad: Just Add QMK

I recently picked up one of those cheap macropads (and wrote about it, of course). It is surprisingly handy and quite inexpensive. But I felt bad about buying it. Something like that should be easy to build yourself. People build keyboards all the time now, and with a small number of keys, you don’t even have to scan a matrix. Just use an I/O pin per switch.

The macropad had some wacky software on it that, luckily, people have replaced with open-source alternatives. But if I were going to roll my own, it would be smart to use something like QMK, just like a big keyboard. But that made me wonder, how much trouble it would be to set up QMK for a simple project. Spoiler: It was pretty easy.

The Hardware

Simple badge or prototype macropad? Why not both?

Since I just wanted to experiment, I was tempted to jam some switches in a breadboard along with a Raspberry Pi Pico. But then I remembered the “simple badge” project I had up on a nearby shelf. It is simplicity itself: an RP2040-Plus (you could just use a regular Pi Pico) and a small add-on board with a switch “joystick,” four buttons, and a small display. You don’t really need the Plus for this project since, unlike the badge, it doesn’t need a battery. The USB cable will power the device and carry keyboard (or even mouse) commands back to the computer.

Practical? No. But it would be easy enough to wire up any kind of switches you like. I didn’t use the display, so there would be no reason to wire one up if you were trying to make a useful copy of this project.

Continue reading “Instant Macropad: Just Add QMK”

Project Scribe thermal printer printing out a receipt

Project Scribe: Receipts For Life

Here’s a fun project. Over on their YouTube page [Urban Circles] introduces Project Scribe.

The idea behind this project is that you can print out little life “receipts”. Notes, jokes, thoughts, anecdotes, memories. These little paper mementos have a physical reality that goes beyond their informational content. You can cut them up, organize them, scribble on them, highlight them, stick them on the wall, or in a scrapbook. The whole idea of the project is to help you make easier and better decisions every day by nudging you in the direction of being more mindful of where you’ve been and where you’re going.

Continue reading “Project Scribe: Receipts For Life”