Linux Fu: Python GUIs For Command Line Programs (Almost) Instantly

Not every programmer likes creating GUI code. Most hacker types don’t mind a command line interface, but very few ordinary users appreciate them. However, if you write command line programs in Python, Gooey can help. By leveraging some Python features and a common Python idiom, you can convert a command line program into a GUI with very little effort.

The idea is pretty simple. Nearly all command line Python programs use argparse to simplify picking options and arguments off the command line as well as providing some help. The Gooey decorator picks up all your options and arguments and creates a GUI for it. You can make it more complicated if you want to change specific things, but if you are happy with the defaults, there’s not much else to it.

At first, this article might seem like a Python Fu and not a Linux Fu, since — at first — we are going to focus on Python. But just stand by and you’ll see how this can do a lot of things on many operating systems, including Linux.

Continue reading “Linux Fu: Python GUIs For Command Line Programs (Almost) Instantly”

Hacking Broken Plastic Parts Without A 3D Printer

We’ve all encountered the odd plastic part that is broken and unobtainable. Sure, 3D printers can print big replacement parts, but sometimes you just need to rebuild a very specific piece. [AkBkukU] shows off a technique for doing just that using a process you could almost call manual 3D printing. We’ve seen baking soda used to cure cyanoacrylate glue before, but this technique uses it to build layers of glue that are apparently quite solid.

There’s quite a bit of nuance in the video below, but the basic idea is to put a pile of soda on one side of a piece of tin foil and a glob of glue. You dip the part in glue and then into the soda. Each time you get a little thicker layer of glue.

Afterward, you’ll have to file and otherwise shape the new part, but the fact that it can survive being filed should tell you something. We were reminded of how some people use epoxy to form repair parts and then machine them to the exact shape needed. At the very end of the video he builds up layers on a part he can’t dip. Did it work? Watch it and see.

In addition to the manual 3D printing technique, he demonstrates using baking soda to cure repairs on a knurled knob from an old clock radio. That’s a bit more conventional, but if you haven’t seen it done before, it is nearly miraculous.

Glue is amazing. We’ve seen hot glue do injection molding. There are many more types out there, too.

Continue reading “Hacking Broken Plastic Parts Without A 3D Printer”

Flying Batteries For Drones

Power is the bane of drone pilots. You’d like to fly longer which means a bigger battery. But a bigger battery will weigh more which leads to less flight time. You have to strike a balance and for most consumer drones that balance is about 20 minutes of flight time, more or less. Researchers at Berkeley have a different idea: don’t use a bigger battery, but simply replace the battery in flight.

The idea isn’t completely new. After all, many planes refuel in flight — a technically sophisticated operation, but it occurs every day. The scheme here is to have a primary battery and a secondary battery. When the secondary battery is low, the drone ejects it while running on the primary battery. Another secondary battery flies to the drone and docks with it becoming the new main power source.

Continue reading “Flying Batteries For Drones”

Fast Video Covers Coax Velocity Factor

We once saw an interview test for C programmers that showed a structure with a few integer, floating point, and pointer fields. The question: How big is this structure? The correct answer was either “It depends,” or “sizeof(struct x).” The same could be said of the question “What is the speed of light?” The flip answer is 186,282 miles per second, or 299,792,458 metres per second. However, a better answer is “It depends on what it is traveling in.” [KB9VBR] discusses how different transmission lines have different velocity factors and what that means when making RF measurements. A cable with a 0.6 velocity factor sees radio signals move at 60% of that 186,282 number.

This might seem like pedantry, but the velocity factor makes a difference because it changes the actual measurements of such things as dipole legs and coax stubs. The guys make a makeshift time domain reflectometer using a signal generator and an oscilloscope.

Continue reading “Fast Video Covers Coax Velocity Factor”

CPU Showdown For Pancakes

If you ask people how they rate as a driver, most of them will say they are better than average. At first, that seems improbable until you realize one thing: people judge themselves by different criteria. So Sally thinks she’s a good driver because she goes fast. Tom’s never had a wreck. Alice never gets lost. You can see the same effect with CPUs. Some are faster or have more memory bandwidth or more instruction issues per cycle. But [Andrew] and [Scharon] at Tom’s Hardware wanted to do the real test of a CPU. How well can it cook pancakes? If you want to know, see the video below.

While your CPU might be great for playing video games, it has a surprisingly small cooking surface, so the guys needed a very small pan. The pan had grooves in it, so they slathered it with thermal grease. We doubt that’s food-grade grease, either. Continue reading “CPU Showdown For Pancakes”

Modular Music Synthesis On The Web

It is hard to imagine how the electronics hobby survived without the Internet. You found like-minded people and projects in magazines. And it is even harder to imagine what projects were in the magazines before the widespread availability of CPU chips. Think about it, there are only so many things you can build with a handful of tubes, transistors, and small ICs. But before the computer revolution took over the hobby, there were always a lot of articles about music synthesis. Coming full circle, you can now build a virtual synthesizer on the web using Zupiter, a modular synthesizer that runs in your browser.

That link is actually about Zupiter, but you can go straight to it if you just want to play. However, we had to do a little reading and try some of the examples, too. You can see a video about the synthesizer, below.

Continue reading “Modular Music Synthesis On The Web”

Raspberry Pi Ham Radio Remote Reviewed

One problem with ham radio these days is that most hams live where you can’t put a big old antenna up due to city laws and homeowner covenants. If you’re just working local stations on VHF or UHF, that might not be a big problem. But for HF usage, using a low profile antenna is a big deal. However, most modern radios can operate remotely. Well-known ham radio company MFJ now has the RigPi Station Server and [Ham Radio DX] has an early version and did a review.

As the name implies, the box contains a Raspberry Pi. There’s also an audio interface. The idea is to consolidate rig control along with other station control (such as rotators) along with feeding audio back and forth to the radio. It also sends Morse code keying to the radio. The idea is that this box will put your radio on the network so that you operate it using a web browser on a PC or a mobile device.

According to MFJ, you can operate voice, Morse code, or digital modes easily and remotely. The box uses open source software that can control over 200 different radios and 30 rotors. Of course, you could build all this yourself and use the same open source software, but it is nicely packaged. [Ham Radio DX] says you don’t need to know much about the Pi or Linux to use the box, although clearly you can get into Linux and use the normal applications if you’re so inclined.

Even if you don’t want to transmit, we could see a set up like this being used for remote monitoring. We’d like to see a companion box for the remote end that had the audio hardware, a keyer, and perhaps a knob to act as a remote control of sorts. Of course, you could probably figure out how to do that yourself. We wonder if some ham clubs might start offering a remote radio via an interface like this — we’ve seen it done before, but not well.

Your $50 radio probably isn’t going to work with this, and if you use FT8, you could argue you don’t need to be there anyway.

Continue reading “Raspberry Pi Ham Radio Remote Reviewed”