Code Craft – Embedding C++: Timing Virtual Functions

Embedded C developers shy away from C++ out of concern for performance. The class construct is one of their main concerns. My previous article Code Craft – Embedding C++: Classes explored whether classes cause code bloat. There was little or no bloat and what is there assures that initialization occurs.

Using classes, and C++ overall, is advantageous because it produces cleaner looking code, in part, by organizing data and the operations on the data into one programming structure. This simple use of classes isn’t the raison d’etre for them but to provide inheritance, or more specifically polymorphism, (from Greek polys, “many, much” and morphē, “form, shape”).

Skeptics feel inheritance simply must introduce nasty increases in timing. Here I once more bravely assert that no such increases occur, and will offer side-by-side comparison as proof.

Continue reading “Code Craft – Embedding C++: Timing Virtual Functions”

Your First GNU Radio Receiver With SDRPlay

Although GRC (the GNU Radio Companion) uses the word radio, it is really a graphical tool for building DSP applications. In the last post, I showed you how you could experiment with it just by using a sound card (or even less). However, who can resist the lure of building an actual radio by dragging blocks around on a computer screen?

For this post and the accompanying video, I used an SDRPlay. This little black box has an antenna jack on one end and a USB port on the other. You can ask it to give you data about a certain area of the RF spectrum and it will send complex (IQ) data out in a form that GRC (or other DSP tools) can process.

The SDRPlay is a great deal (about $150) but if you don’t want to invest in one there are other options. Some are about the same price (like the HackRF or AirSpy) and have different features. However, you can also use cheap TV dongles, with some limitations. The repurposed dongles are not as sensitive and won’t work at lower frequencies without some external help. On the other hand, they are dirt cheap, so you can overlook a few little wrinkles. You just can’t expect the performance you’ll get out of a more expensive SDR box. Some people add amplifiers and converters to overcome these problems, but at some point it would be more cost effective to just spring for a more expensive converter.

Continue reading “Your First GNU Radio Receiver With SDRPlay”

Getting Started With GNU Radio

Software Defined Radio (SDR)–the ability to process radio signals using software instead of electronics–is undeniably fascinating. However, there is a big gap from being able to use off-the-shelf SDR software and writing your own. After all, SDRs require lots of digital signal processing (DSP) at high speeds.

Not many people could build a modern PC from scratch, but nearly anyone can get a motherboard, some I/O cards, a power supply, and a case and put together a custom system. That’s the idea behind GNU Radio and SDR. GNU Radio provides a wealth of Python functions that you can use to create sophisticated SDR application (or, indeed, any DSP application).

If Python is still not up your alley (or even if it is), there’s an even easier way to use GNU Radio: The GNU Radio Companion (GRC). This is a mostly graphical approach, allowing you to thread together modules graphically and build simple GUIs to control you new radio.

Even though you usually think of GRC as being about radios, it is actually a good framework for building any kind of DSP application, and that’s what I’ll show you in the video below. GRC has a signal generator block and interfaces to your sound card. It even has the ability to read and write data to the file system, so you can use it to do many DSP applications or simulations with no additional hardware.

UPDATE: Don’t miss the follow-up post that uses SDRPlay to build a GNU Radio based receiver.

Continue reading “Getting Started With GNU Radio”

Nvidia Brings Computer Vision And Deep Learning To The Embedded World

Today, Nvidia announced their latest platform for advanced technology in autonomous machines. They’re calling it the Jetson TX1, and it puts modern GPU hardware in a small and power efficient module. Why would anyone want GPUs in an embedded format? It’s not about frames per second; instead, Nvidia is focusing on high performance computing tasks – specifically computer vision and classification – in a platform that uses under 10 Watts.

For the last several years, tiny credit card sized ARM computers have flooded the market. While these Raspberry Pis, BeagleBones, and router-based dev boards are great for running Linux, they’re not exactly very powerful.  x86 boards also exist, but again, these are lowly Atoms and other Intel embedded processors. These aren’t the boards you want for computationally heavy tasks. There simply aren’t many options out there for high performance computing on low-power hardware.

Nvidia
The Jetson TX1 and Developer Kit. Image Credit: Nvidia

Tiny ARM computers the size of a credit card have served us all well for general computing tasks, and this leads to the obvious question – what is the purpose of putting so much horsepower on such a small board. The answer, at least according to Nvidia, is drones, autonomous vehicles, and image classification.

Image classification is one of the most computationally intense tasks out there, but for autonomous robots, there’s no other way to tell the difference between a cyclist and a mailbox. To do this on an embedded platform, you either need to bring a powerful general purpose CPU that sucks down 60 or so Watts, or build a smaller, more efficient GPU-based solution that sips a meager 10 Watts.

Continue reading “Nvidia Brings Computer Vision And Deep Learning To The Embedded World”

Your Unhashable Fingerprints Secure Nothing

Passwords are crap. Nobody picks good ones, when they do they re-use them across sites, and if you use even a trustworthy password manager, they’ll get hacked too. But you know what’s worse than a password? A fingerprint. Fingerprints have enough problems with them that they should never be used anywhere a password would be.

Passwords are supposed to be secret, like the name of your childhood pet. In contrast, you carry your fingers around with you out in the open nearly everywhere you go. Passwords also need to be revocable. In the case that your password does get revealed, it’s great to be able to simply pick another one. You don’t want to have to revoke your fingers. Finally, and this is the kicker, you want your password to be hashable, in order to protect the password database itself from theft.

In the rest of the article, I’ll make each of these three cases, and hopefully convince you that using fingerprints in place of a password is even more broken than using a password in the first place. (You listening Apple and Google? No, I didn’t think you were.)

Continue reading “Your Unhashable Fingerprints Secure Nothing”

Development Tools Of The Prop-Making World

We’ve seen them before. The pixel-perfect Portal 2 replica, the Iron Man Arc Reactor, the Jedi Lightsaber. With the rise of shared knowledge via the internet, we can finally take a peek into a world hidden behind garage doors, basements, and commandeered coffee tables strewn with nuts, bolts, and other scraps. That world is prop-making. As fab equipment like 3D printers and laser cutters start to spill into the hands of more people, fellow DIY enthusiasts have developed effective workflows and corresponding software tools to lighten their loads. I figured I’d take a brief look at a few software tools that can open the possibilities for folks at home to don the respirator and goggles and start churning out props.

Continue reading “Development Tools Of The Prop-Making World”

Hackaday Prize Party This Saturday At The SuperConference

Last year marked the first-ever Hackaday Prize, where we challenged you to build a connected device so compelling that we’d send you to space. We awarded the Prize at a party following a day-long, multi-track hackathon in Munich, Germany. A great time was had by all.

This year, the Hackaday Prize itself is even bigger, the challenge even more ambitious, and the festivities are going to be even grander. So come join us in San Francisco this coming Saturday as we award the 2015 Hackaday Prize and throw a (free) prize party to celebrate!

The awards will be part of the first-ever Hackaday SuperConference. We’re bringing together the best minds in hardware hacking and there’s a place for you. The conference will be packed with hardware workshops, talks, food, and fun. (Don’t delay — you have three more days to buy a SuperConference ticket before prices double.) The super-charged scheduled of events have just been published.

judges-at-hackaday-prize-partyDirectly after the SuperConference, we’re opening the doors to everyone at 5:30pm — whether you’re attending the conference or not — for the presentation ceremony followed by the Hackaday Prize Party.  Many of our judges will be on hand to present the prizes and to socialize afterward: Elecia White, Lenore Edman, Windell Oskay, Ben Krasnow and Peter Dokter. Get your free Awards Ceremony ticket now!

As you know, the grand prize is a Trip to Space for the project most likely to help solve some of our hardest  challenges. Come cheer for your favorite!

Because we had so many polished projects last year, we’ve also expanded the Hackaday Prize in 2015 to include a Best Product award. Seven of the ten finalists will be on hand to find out who will go away with $100,000 in cash and a residency at the Supplyframe Design Lab in Pasadena. It’s going to be an exciting night.

Dinner is included with this free event, there will be a cash bar, and the music and festivities will carry on until 10:30pm. Please RSVP to help us plan the dinner arrangements. See you on Saturday!

SuperconFlyer03

The 2015 Hackaday Prize is sponsored by: