Alexa, Sudo Read My Resistor! A Challenge for Hackers

Nothing makes us feel more like we’re on Star Trek then saying “Computer, turn on desk light,” and watching the light turn on. Of course, normal people would have left the wake up word as “Alexa,” but we like “Computer” even if it does make it hard to watch Star Trek episodes without the home automation going crazy.

There’s a lot of hype right now about how voice recognition and artificial intelligence (AI) are transforming everything. We’ve even seen a few high-profile types warning that AI is going to come alive and put us in the matrix or something. That gets a lot of press, but we’re not sure we are even close to that, yet. Alexa and Google’s similar offerings are cool, there’s no doubt about it. The speech recognition is pretty good, although far from perfect. But the AI is really far off still.

Today’s devices utilize two rather rudimentary parts to provide an interaction with users. The first is how the devices pattern match language; it isn’t all that sophisticated. The other is the trivial nature of many of the apps, or — as Alexa calls them — skills. There are some good ones to be sure, but for every one useful application of the technology, there’s a dozen that are just text-to-speech of an RSS feed. Looking through the skills available we were amused at how many different offerings convert resistor color codes back and forth to values.

There was a time when building electronics meant learning the resistor color code. With today’s emphasis on surface mount components, though, it is less useful than it used to be. Still, like flossing, you really ought to do it. However, if you have an Amazon Alexa, it can learn the color code for you thanks to [Dennis Mantz].

Don’t have an Alexa? You can still try it in your browser, as we will show you shortly. There are at least eight similar skills out there like this one from [Steve Jernigan] or [Andrew Bergstrom’s] Resistor Reader.

Sometimes Alexa Just Doesn’t Understand

The problem the way skills work is that Alexa strictly matches templates to figure out what skill to use. So if we were hanging out at a workbench someone might say, “What color is a 22K resistor?” and everyone would know — well, perhaps not the answer (red, red, orange) but they would at least understand the question. Not Alexa. If you install the first resistor color code skill we mentioned, you can ask questions like “Alexa, ask resistor color codes what is the code for 220 ohms?” Or, try “Alexa, ask resistor color codes what the value of brown black green is?”

There are a few skills that hook in a little closer with some overloaded words like “turn on.” However, that tends to confuse things when you say, “Turn on the Roku in the living room” versus “Turn on the Roku in the bedroom.”

We know what you are thinking: If you don’t like it, learn the resistor color code. We don’t disagree. There are plenty of memory devices like “Bad beer rots our young guts, but vodka goes well.” If you don’t like that one, take your pick of the others. Be warned, some of them at the bottom of that link are patently offensive. Then again, shocking mnemonics are often easier to remember, including one about Batman that we didn’t see on that list.

On the other hand, if you are getting your kids to help you sort resistors, this could be just the ticket. There are other Alexa skills that could be useful, too. There’s ASCII converter and since it only seems to report codes in decimal, there’s a skill for base conversion, too (or try this converter). For the true geek, there’s always this clock.

Hacking Alexa Skills

So we are still a long ways away from HAL 9000-level AI. On the other hand, this is a fertile ground for hacking. It seems hard to imagine that the best we can do is resistor color code and ASCII tables. We aren’t sure if it is that hard to do anything, or if it is just hard to think of something compelling. We probably don’t want “Alexa, program my Arduino.”

Want to experiment with building something smarter? The skill development kit is available and free and there are plenty of examples. If you want to see some non-trivial examples that work well, check out the integration of Google to Alexa (something Amazon is probably not crazy about) or the way an enterprising hacker has plugged Google Music into Alexa (you do need your own server to make this work). On the back end side, we covered a simple hack to control over a dozen outputs with one ESP8266. That should fire your imagination.

Alexa coffee maker robot
Alexa coffee maker robot

If you don’t have an Alexa-device, you can make one with a Raspberry Pi. Or, if you are lazy and have an Amazon account, you can use Alexa in any Web browser — sort of. Just add the resistor color code skill or your next killer skill to your Amazon account and hold the microphone button on the web app. You’ll probably have to authorize it to use your microphone the first time you try it. The Web-based tool won’t play music and probably has some other limitations, but you can add skills in the Alexa app and the browser version will use them. There’s also the Ubi app for Android phones. So getting your feet wet in development doesn’t have to cost a cent.

Is it worth learning to do this? We think so. Not only does it seem to be the wave of the future, but remember that just like you can build Alexa into a Raspberry Pi, that means you can also build it into your own projects. Voice-activated coffee pot? No problem. Conversational toys? Easy. What about a voice-controlled oscilloscope or logic analyzer. “Computer. Set trigger level to 25 millivolts.” Now that would be like Star Trek.

Source link

Leave a Reply

Your email address will not be published. Required fields are marked *