Linux Fu: Regular Expressions

If you consider yourself a good cook, you may or may not know how to make a souffle or baklava. But there are certain things you probably do know how to do that form the basis of many recipes. For example, you can probably boil water, crack an egg, and brown meat. With Linux or Unix systems, you can make the same observation. You might not know how to set up a Wayland server or write a kernel module. But there are certain core skills like file manipulation and editing that will serve you no matter what you do. One of the pervasive skills that often gives people trouble is regular expressions. Many programs use these as a way to specify search patterns, usually in text strings such as files.

If you aren’t comfortable with regular expressions, that’s easy to fix. They aren’t that hard to learn and there are some great tools to help you. Many tools use regular expressions and the core syntax is the same. The source of confusion is that the details beyond core syntax have variations.

Let’s look at the foundation you need to understand regular expression well.

Continue reading “Linux Fu: Regular Expressions”

Zip Tie Quadcopter Frame Is As Cheap As They Come

We’ve seen some cheap quadcopter builds over the years, but this one takes the cake. After seeing somebody post a joke about building a quadcopter frame out of zip ties and hot glue, [IronMew] decided to try it for real. The final result is a micro quadcopter that actually flies half-way decently and seems to be fairly resistant to crash damage thanks to the flexible structure.

The first attempts at building the frame failed, as the zip ties (unsurprisingly) were too flexible and couldn’t support the weight of the motors. Eventually, [IronMew] realized that trying to replicate the traditional quadcopter frame design just wasn’t going to work. Rather than a body with arms radiating out to hold the motors, the layout he eventually came up with is essentially the reverse of a normal quadcopter frame.

Zip ties reinforced with a healthy coating of hot glue are arranged into a square, with a motor at each corner. Then four zip ties are used to support the central “pod” which holds the battery and electronics. No attempt is made to strengthen this part of the frame, and as such the heavy central pod hangs down a bit in flight. [IronMew] theorizes that this might actually be beneficial in the end, as he believes it could have a stabilizing effect when it comes time to record FPV video.

He mentions that he’s still struggling to get the PID values setup properly in the flight computer, but in the video after the break you can see that it’s flying fairly well for a first attempt. We wouldn’t recommend you tear into a bag of zip ties when it comes time to build your first quadcopter, but it does go to show that there’s plenty of room for experimentation.

We’ve covered a number of unique quadcopter frames if you’re looking for something to set your next build apart from the rest. If you’ve got a big enough bed you can 3D print a very nice frame, but if you’ve got more time than equipment, you could always cut one out of a piece of plywood.

Continue reading “Zip Tie Quadcopter Frame Is As Cheap As They Come”

Google Ups The Ante In Quantum Computing

At the American Physical Society conference in early March, Google announced their Bristlecone chip was in testing. This is their latest quantum computer chip which ups the game from 9 qubits in their previous test chip to 72 — quite the leap. This also trounces IBM and Intel who have 50- and 49-qubit devices. You can read more technical details on the Google Research Blog.

It turns out that just the number of qubits isn’t the entire problem, though. Having qubits that last longer is important and low-noise qubits help because the higher the noise figure, the more likely you will need redundant qubits to get a reliable answer. That’s fine, but it does leave fewer qubits for working your problem.

Continue reading “Google Ups The Ante In Quantum Computing”

Racing The Beam On An ATtiny

For the last thirty or so years, the demoscene community has been stretching what is possible on computer systems with carefully crafted assembly and weird graphical tricks. What’s more impressive is hand-crafted assembly code pushing the boundaries of what is possible using a microcontroller. Especially small microcontrollers. In what is probably the most impressive demo we’ve seen use this particular chip, [AtomicZombie] is bouncing boing balls on an ATtiny85. It’s an impressive bit of assembly work, and the video is some of the most impressive stuff we’ve ever seen on a microcontroller this small.

First, the hardware. This is just about the simplest circuit you can build with an ATtiny85. There’s an ISP header, a VGA port with a few resistors, a 1/8″ audio jack driven by a transistor, and most importantly, a 40MHz crystal. Yes, this ATtiny is running far faster than the official spec allows, but it works.

The firmware for this build is entirely assembly, but surprisingly not that much assembly. It’s even less if you exclude the hundred or so lines of definitions for the Boing balls.

The resulting code spits out VGA at 204×240 resolution and sixty frames per second. These are eight color sprites, with Alpha, and there’s four-channel sound. This is, as far as we’re aware, the limit of what an ATtiny can do, and an excellent example of what you can do if you buckle down and write some really tight assembly.

Continue reading “Racing The Beam On An ATtiny”

Comic Boxes Reflect Owner’s Skills

We are the culmination of our experiences. We build with the tools we’re familiar. We design with the decorations we like. Sometimes this thinking leads to a project that looks like a kindergartener who has dressed in a pink tutu and a camo shirt. Sometimes our experience leads us to make something functional and elegant. [jordanlund] combined his work experience in a library, 3D modeling skills, and love of comic books to turn a hodgepodge pile of scribbled-upon boxes into an orderly collection of comic books in boxes adorned with brass drawer pulls.

3D printing bridged the gap between the brass card catalog drawer pulls he knew well from the library and the crates of comics he kept at home. Custom brackets allowed the drawer pulls, which were meant to be screwed into wooden drawer faces, to work with cardboard boxes. The drawer pulls have a slot for labels so there will be no need to rip off sticky labels later or scrawl with a permanent marker. Perhaps [jordanlund] is merely a bibliophile with a 3D printer but if we didn’t know better, we might think those boxes were meant to have the drawer pulls installed.

Engage your own love of literature with this wordplay riddled appeal for libraries. or make your home library a little more fantasical with a secret door.

A Relay Calculator With DIY Neon Displays, Just Because

This looks like one of those projects that started out as a glimmer of an idea and led down a rabbit hole. But it’s a pretty cool rabbit hole that leads to homebrew neon seven-segment displays on a calculator with relay logic.

It’s a little thin on documentation so far, but that’s because [Mark Miller]’s build is one of those just-for-the-fun-of-it things. He started with a bag full of NE-2 tubes and the realization that a 3D-printed frame would let him create his own seven-segment displays. The frames have a slot for each segment, with a lamp and current limiting resistor tucked behind it; with leads brought out to pins and some epoxy potting, these displays would be hard to tell from a large LED seven-segment. Rolling your own displays has the benefit of being able to extend the character set, which [Mark] did with plus-minus and equal sign modules. All of these went together into a two-banger calculator — addition and subtraction only so far — executed in relays and vacuum tubes. Version 2.0 of the calculator regressed to all-relay logic, which must sound great.

We heartily regret the lack of a satisfyingly clicky video, but we’ll give it a pass since this is so cool. We’ll be watching for more on this project, but in the meantime, if you still need to get your click on, this electromechanical BCD counter should help.

Autodesk Introduces Parametric Part Generation

The hardest part of any PCB design is adding parts and components. You shouldn’t use random part libraries, and creating your own part libraries is just a pain. Why have we endured this pain for so long, especially considering that most components follow a standard? Add in the fact that 3D modeling and rendering a board in a mechanical CAD tool is now a thing, making creating your own part libraries even more involved.

To solve this problem, Autodesk has introduced library.io, a tool to parametrically generate component footprints for Eagle and 3D models for Fusion360. Given that most parts follow a standard — QFP, TO-, DFN, or SOT23 — this is now the easiest way to create a new part in Eagle with its own 3D model that allows you to bring it into mechanical CAD tools.

An overview parametric parts generation is written up on the Autodesk forums, and covers what is possible with this new tool. There are actually two distinct versions, one is a web-based app that allows you to create packages and footprints parametrically in your browser and export them as a library. The other version of the tool is integrated with Eagle and allows you to create a new component parametrically from within Eagle.

This is a far cry from the standard method of creating new footprints. Instead of toiling over a datasheet and dropping correctly sized pads onto a grid, creating a new parametric footprint is as easy as copying a few numbers. In addition to the new parametric design feature, there’s a new tool in Eagle that does away with placing and naming pins for symbols. Now you can simply cut and paste a list of pins from the datasheet.

It should be noted that everything created with the library.io tool can be downloaded and used offline. Combine that with the recent news that KiCad can now ingest Eagle board and schematic files, and you have a way to create parametric footprints in everyone’s favorite Open Source PCB tool as well.