Linux Fu: Literate Regular Expressions

Regular expressions — the things you feed to programs like grep — are a bit like riding a bike. It seems impossible until you learn to do it, and then it’s easy. Part of their bad reputation is because they use a very concise and abbreviated syntax that alarms people. To help people who don’t use regular expressions every day, I created a tool that lets you write them in something a little closer to plain English. Actually, I’ve written several versions of this over the years, but this incarnation that targets grep is the latest. Unlike some previous versions, this time I did it all using Bash.

Those who don’t know regular expressions might freak out when they see something like:

[0-9]{5}(-[0-9]{4})?

How long does it take to figure out what that does? What if you could write that in a more literate way? For example:

digit repeat 5 \

start_group \

   - digit repeat 4 \

end_group optional

Not as fast to type, sure. But you can probably deduce what it does: it reads US Zipcodes.

I’ve found that some of the most popular tools I’ve created over the years are ones that I don’t need myself. I’m sure you’ve had that experience, too. You know how to operate a computer, but you create a menu system for people who don’t and they love it. That’s how it is with this tool. You might not need it, but there’s a good chance you know someone who does. Along the way, the code uses some interesting features of Bash, so even if you don’t want to be verbose with your regular expressions, you might pick up a trick or two.

Continue reading “Linux Fu: Literate Regular Expressions” →

ISS Ham Radio Repeater

There is a long history of spacecraft carrying ham radio gear, as the Space Shuttle, Mir, and the ISS have all had hams aboard with gear capable of talking to the Earth. However, this month, the ISS started operating an FM repeater that isn’t too dissimilar from a terrestrial repeater. You can see [TechMinds] video on the repeater, below.

The repeater has a 2 meter uplink and a 70 centimeter downlink. While you can use a garden variety dual-band ham transceiver to use the repeater, you’ll probably need a special antenna along with special operating techniques.

Continue reading “ISS Ham Radio Repeater” →

New Zealand To Test Wireless Power Transmission

Nikola Tesla wanted to beam power without wires. NASA talked about building power-generating satellites that would do the same thing. But now New Zealand’s second-largest power utility — Powerco — is working with a start-up company to beam energy to remote locations. There have been several news releases, but possibly the most technical detail is from an interview [Loz Blain] did with the founder of the startup company.

It isn’t really news that you can send radio waves somewhere and convert the signal back into power. Every antenna does that routinely. The question is how efficient is the power transmission and — when the power levels are high — how safe is it? According to [Greg Kushnir], the founder of Emrod, the technology is about 70% efficient and uses ISM frequencies.

Continue reading “New Zealand To Test Wireless Power Transmission” →

Upgraded Infotainment Options On A 14 Year Old Mercedes

It used to be that upgrading a car stereo was fairly simple. There were only a few mechanical sizes and you could find kits to connect power, antennas, and speakers. Now, though, the car stereo has interfaces to steering wheel controls, speed sensors, rear-view cameras, and more. [RND_ASH] was tired of his 14-year-old system so he took an Android head unit, a tablet, and an Arduino, and made everything work as it was supposed to.

The key is to interface with the vehicle’s CAN bus which is a sort of local area network for the vehicle. Instead of having lots of wires running everywhere, today’s cars are more likely to have less wiring all shared with many devices.

Continue reading “Upgraded Infotainment Options On A 14 Year Old Mercedes” →

Paper Keyboard Is Self-Powered

Building a keyboard isn’t a big project these days. Controller chips and boards are readily available, switches are easy to find, and a 3D printer can do a lot of what used to be the hard parts. But engineers at Purdue have printed a self-powered Bluetooth keyboard on an ordinary sheet of paper. You can see videos of the keyboards at work below.

The keyboards work by coating paper with a highly fluorinated coating that repels water, oil, and dust. Special inks print triboelectric circuits so that pressing your finger on a particular part of the paper generates electricity. We were skeptical that the Bluetooth part is self-powered, although maybe it is possible if you have some very low-power electronics or you manage the power generated very carefully.

Continue reading “Paper Keyboard Is Self-Powered” →

Tutorial For Setting Up Raspberry Pi For Ham Radio Use

There was a time when a ham radio set up sported many dials and switches and probably quite a few boxes as well. Computers have changed all that. Some transceivers now have just a few buttons or are even totally computer-controlled. Where a ham, at one time, might have a TeleType machine, a slow-scan TV monitor, and a fax printer for receiving satellite images, now that can all be on a single computer which can even be a Raspberry Pi. [F4GOH] has a post that takes you from the fundamentals to installing everything from an SDR to many common ham programs for digital modes, APRS, SSTV, and more. You can download the seven-part tutorial as separate PDF files, too.

Even if you aren’t a ham, you might find some of the software interesting. OpenWebRX lets you listen to your software defined radio on the road. You can use other software to pick up weather satellite data.

Continue reading “Tutorial For Setting Up Raspberry Pi For Ham Radio Use” →

You Don’t Need A Weatherman To Know Which Way The Drone Blows

“How’s the weather?” is a common enough question down here on the ground, but it’s even more important to pilots. Even if they might not physically be in the cockpit of the craft they are flying. [Justin Parsons] explains how weather affects drone flights and how having API access to micro weather data can help ensure safe operations.

As drone capability and flight time increase, the missions they will fly are getting more and more complex. [Justin] uses a service called ClimaCell which has real-time, forecast, and historical weather data available across the globe. The service isn’t totally free, but if you make fewer than 1,000 calls a day you might be able to use a developer account which doesn’t cost anything.

According to [Justin], weather data can help with pre-flight planning, in-flight operations, and post-flight analysis. The value of accurate forecasting is indisputable. However, a drone or its ground controller could certainly understand real-time weather in a variety of ways and record it for later use, so the other two use cases maybe a little less valuable.

While on the subject, it seems to us that accurate forecasting could be important for other kinds of projects. Will you have enough sun to catch a charge on your robot lawnmower tomorrow? If your beach kiosk is expecting rain, it could deploy an umbrella or close some doors and shutdown for a bit.

If you insist on using a free service, the ClimaCell blog actually lists their top 8 APIs. Naturally, their service is number one, but they do have an assessment of others that seems fair enough. Nearly all of these will have some cost if you use it enough, but many of them are pretty reasonable unless you’re making a huge number of calls.

How would you use accurate micro weather data? Let us know in the comments. Then again, sometimes you want to know the weather right from your couch. Or maybe you’d like your umbrella to tell you how long the storm is going to last.