A Gentle Introduction To Ncurses For The Terminally Impatient

Considered by many to be just a dull output for sequential text, the command-line terminal is a veritable canvas to the creative software developer. With the cursor as the brush, entire graphical user interfaces can be constructed, or even a basic text-based dashboard on which values can be updated without redrawing the entire screen over and over, or opting for a much heavier solution like a GUI.

Ncurses is one of the most well-known and rather portable Terminal User Interface (TUI) libraries using that such cursor control, and more, can be achieved in a fairly painless manner. That said, for anyone coming from a graphical user interface framework, the concepts and terminology with ncurses and similar can be confusingly different yet overlapping, so that getting started can be somewhat harrowing.

In this article we’ll take a look at ncurses’ history, how to set it up and how to use it with C and C++, and many more languages supported via bindings.

Continue reading “A Gentle Introduction To Ncurses For The Terminally Impatient”

How Discord Was Ported To Windows 95 And NT 3.1

On the desktop, most people use the official HTML and JavaScript-based client for Discord in either a browser or a still-smells-like-a-browser Electron package. Yet what if there was a way to use a third-party client and even run it on Windows XP, Windows 95, and NT 3.1? This is exactly what [iDontProgramInCpp] did with their Discord Messenger project.

Fortunately, as a web ‘app’ the Discord API is readily accessible and they don’t seem to be in a rush to ban third-party clients. But it did require a bit of work to add newer versions of TLS encryption to Windows XP and older. Fortunately OpenSSL still supports these older platforms, so this was not a major hurdle and Windows XP happily ran this new Discord client. That left porting to older Windows versions.

Most of the challenge lies in writing shims for API calls that do not exist on these older platforms when backporting software from Windows XP to older Windows versions, and GCC (MinGW) had to be used instead of MSVC, but this also was a relatively minor detail. Finally, Windows NT 3.1 was picked as the last challenge for Discord Messenger, which ran into MSVCRT runtime issues and required backporting features to the NT 3.1 version that was still part of the OS back then.

[MattKC] covers the project in a recent video, as well as the AeroChat client which targets Windows Live Messenger fans.  Hopefully the API that allows these projects to operate doesn’t get locked down, as third-party clients like these bring their own unique advantages to the Discord ecosystem.

Continue reading “How Discord Was Ported To Windows 95 And NT 3.1”

Robot Dinosaur YOLOs Colors And Shapes For Kids

YOLO can mean many things, but in the context of [be_riddickulous]’s AI Talking Robot Dinosaur it refers to the “You Only Look Once” YOLOv11 object-detection algorithm by Ultralytics, the method by which this adorable dino recognizes colors and shapes to teach them to children.

If you’re new to using YOLO or object recognition more generally, [be_riddiculous]’s tutorial is not a bad place to get started. She goes through how many images you’ll need and what types to get the shape-and-color recognition needed for this project, as well as how to annotate them and train the model, either locally or in the cloud.

The project itself is an adorable paper-mache dinosaur with a servo-actuated mouth hiding some LEDs and a Raspberry Pi camera module to provide images. In operation, the dinosaur “talks” to children using pre-recorded voice lines, inviting them to play a game and put a specific shape, or shape of a specific color (or both) in its mouth. Then the aforementioned object detection (running on a laptop) goes “YOLO” and identifies the shape so the toy can provide feedback on the child’s choice via a speaker in the belly of the beast.

The link to the game code is currently not valid, but it looks like they used PyGame for the audio output code. A servo motor controls the mouth, but without that code it’s not entirely clear to us what it’s doing. We expect by the time you read this there’s good odds [be_riddickulous] will have fixed that link and you can see for yourself.

The only thing that holds this back from being a great toy to put in every Kindergarten class is the need to have a laptop close by to plug the webcam into. A Raspberry Pi 5 ought to have the horsepower to run YOLOv11, so with a little extra effort the whole thing could be standalone — there might even be room in there for batteries.We’ve had other hacks aimed at little ones, like a kid-friendly computer to relive the glory days of the school computer lab or one of the many iterations of the RFID jukebox idea. If you want to wow the kiddos with AI, perhaps take a look at this talking Santa plush.

Got a cool project, AI, kid-related, or otherwise? Don’t forget to toss us a tip!

Rhapsody OS is shown in its boot sequence on a monitor; the edge of the motherboard running it is just visible in the right side of the image.

Bringing An Obscure Apple Operating System To Modern Hardware

During Apple’s late-90s struggles with profitability, it made a few overtures toward licensing its software to other computer manufacturers, while at the same time trying to modernize its operating system, which was threatening to slip behind Windows. While Apple eventually scrapped their licensing plans, an interesting product of the situation was Rhapsody OS. Although Apple was still building PowerPC computers, Rhapsody also had compatibility with Intel processors, which [Omores] put to good use by running it on a relatively modern i7-3770 CPU.

[Omores] selected a Gigabyte GA-Z68A-D3-B3 motherboard because it supports IDE emulation for SATA drives, a protocol which Rhapsody requires. The operating system installer needs to run from two floppy disks, one for boot and one for drivers. The Gigabyte motherboard doesn’t support a floppy disk drive, so [Omores] used an older Asus P5E motherboard with a floppy drive to install Rhapsody onto an SSD, then transferred the SSD to the Gigabyte board. The installation initially had a kernel panic during installation caused by finding too much memory available. Limiting the physical RAM available to the OS by setting the maxmem value solved this issue.

After this, the graphical installation went fairly smoothly. A serial mouse was essential here, since Rhapsody doesn’t support USB. It detected the video card immediately, and eventually worked with one of [Omores]’s ethernet cards. [Omores] also took a brief look at Rhapsody’s interface. By default, there were no graphical programs for web browsing, decompressing files, or installing programs, so some command line work was necessary to install applications. Of course, the highlight of the video was the installation of a Doom port (RhapsoDoom).

This isn’t the first obscure Apple operating system we’ve seen; some of them have even involved updates to Apple’s original releases. We’ve also seen people build Apple hardware.

Thanks to [Stephen Walters] for the tip!

History Of Forgotten Moon Bases

If you were alive when 2001: A Space Odyssey was in theaters, you might have thought it didn’t really go far enough. After all, in 1958, the US launched its first satellite. The first US astronaut went up in 1961. Eight years later, Armstrong put a boot on the moon’s surface. That was a lot of progress for 11 years. The movie came out in 1968, so what would happen in 33 years? Turns out, not as much as you would have guessed back then. [The History Guy] takes us through a trip of what could have been if progress had marched on after those first few moon landings. You can watch the video below.

The story picks up way before NASA. Each of the US military branches felt like it should take the lead on space technology. Sputnik changed everything and spawned both ARPA and NASA. The Air Force, though, had an entire space program in development, and many of the astronauts for that program became NASA astronauts.

Continue reading “History Of Forgotten Moon Bases”

A coiled black USB-C to USB-C cable is shown on a white background.

An Open-Source Justification For USB Cable Paranoia

Most people know that they shouldn’t plug strange flash drives into their computers, but what about a USB cable? A cable doesn’t immediately register as an active electronic device to most people, but it’s entirely possible to hide a small, malicious microcontroller inside the shell of one of the plugs. [Joel Serna Moreno] and some collaborators have done just that with their Evil Crow Cable-Wind.

This cable comes in two variants: one USB-A to USB-C, and one with USB-C to USB-C. A tiny circuit board containing an ESP32-S3 hides inside a USB-C plug on each cable, and can carry out a keystroke injection attack. The cable’s firmware is open-source, and has an impressive set of features: a payload syntax checker, payload autocompletion, OS detection, and the ability to impersonate the USB device of your choice.

The cable provides a control interface over WiFi, and it’s possible to edit and deploy live payloads without physical access to the cable (this is where the syntax checker should be particularly useful). The firmware also provides a remote shell for computers without a network connection; the cable opens a shell on the target computer which routes commands and responses through the cable’s WiFi connection (demonstrated in the video below).

The main advantage of the Evil Crow Cable Wind is its price: only about $25, at which point you can afford to lose a few during deployment. We’ve previously seen a malicious cable once before. Of course, these attacks aren’t limited to cables and USB drives; we’ve seen them in USB-C docks, in a gaming mouse, and the fear of them in fans.

Thanks to [rustysun9] for the tip!

Balancing Robot Gallery

Cube Teeter Totter: One Motor, Many Lessons

Balancing robots are always fun to see, as they often take forms we’re not used to, such as a box standing on its corner. This project, submitted by [Alexchunlin], showcases a cool single motor reaction cube, where he dives into many lessons learned during its creation.

At the outset, [Alexchunlin] thought this would be a quick, fun weekend project, and while he achieved that, it took longer than a weekend in the end. The cube’s frame was a simple 3D print with provisions to mount his MotorGo AXIS motor controller. This motor controller was initially designed for another project, but it’s great to see him reuse it in this build.

Once the parts were printed and assembled, the real work began: figuring out the best way to keep the cube balanced on its corner. This process involved several steps. The initial control code was very coarse, simply turning the motor on and off, but this didn’t provide the fine control needed for delicate balancing. The next step was implementing a PID control loop, which yielded much better results and allowed the cube to balance on a static surface for a good amount of time. The big breakthrough came when moving from a single PID loop to two control loops. In this configuration, the PID loop made smaller adjustments, while another control loop focused on the system’s total energy, making the cube much more stable.

By the end of the build, [Alexchunlin] had a cube capable of balancing in his hand, but more importantly, it was a great learning experience in controls. Be sure to visit the project page for more details on this build and check out his video below, which shows the steps he took along the way. If you find this project interesting, be sure to explore some of our other featured reaction wheel projects.

Continue reading “Cube Teeter Totter: One Motor, Many Lessons”