Embed With Elliot: Interrupts, The Ugly

Welcome to part three of “Interrupts: The Good, the Bad, and the Ugly”. We’ve already professed our love for interrupts, showing how they are useful for solving multiple common microcontroller tasks with aplomb. That was surely Good. And then we dipped into some of the scheduling and priority problems that can crop up, especially if your interrupt service routines (ISRs) run for too long, or do more than they should. That was Bad, but we can combat those problems by writing lightweight ISRs.

This installment, for better or worse, uncovers our least favorite side effect of running interrupts on a small microcontroller, and that is that your assumptions about what your code is doing can be wrong, and sometimes with disastrous consequences. It’s gonna get Ugly

TL;DR: Once you’ve started changing variables from inside interrupts, you can no longer count on their values staying constant — you never know when the interrupt is going to strike! Murphy’s law says that it will hit at the worst times. The solution is to temporarily turn off interrupts for critical blocks of code, so that your own ISRs can’t pull the rug out from under your feet. (Sounds easy, but read on!)
Continue reading “Embed With Elliot: Interrupts, The Ugly”

No Sex Please, We’re Robots

There was a time when technology would advance and launch debates over ethical concerns raised by the technology. Lately, however, it seems ethical debate is (I hope) in advance of the actual technology. Maybe that’s a good thing.

Case in point: A paper at Ethicomp 2015 from De Montfort University warns that having sex with robots may have negative effects on par with prostitution. You might think that this is an isolated academic concept, but apparently there is a conference titled The International Congress on Love and Sex with Robots. There’s even a 2008 book titled Love and Sex with Robots that is neither science fiction nor pornography.

Second case: Softbank has created a robot called [Pepper] that supposedly can understand human emotions. You know the license agreements you get with everything you buy that you don’t really read? Here’s a translation of part of the one that comes with [Pepper]: ” …owner must not perform any sexual act or other indecent behavior.

Continue reading “No Sex Please, We’re Robots”

Numato Opsis: FPGA-based Open Video Platform

Imagine that you’re running a conference and you want to do a professional job recording the speakers and their decks. You’ll need to record one video stream from the presenter’s laptop, and it’d be nice to have another of the presenter taken with a camera. But you also need to have the presenter’s screen displayed on a projector or two for the live audience. And maybe you’d like all of this dumped down to your computer so that you can simultaneously archive the presentation and stream it out over the Internet.

io-ports_png_project-bodyThat’s exactly the problem that the hdmi2usb project tries to solve on the software side for open-source software conventions. And to go with this software, [Tim Ansell] has built the Numato Opsis FPGA video board, to tie everything together. What’s great about the platform is that the hardware and the firmware are all open source too.

Because everything’s open and it’s got an FPGA on board doing the video processing, you’re basically free to do whatever you’d like with the content in transit, so it could serve as an FPGA video experimenter board. It also looks like they’re going to port code over so that the Opsis could replace the discontinued, but still open source, Milkimist One video effects platform.

One thing that’s really cute about the design is that it reports over USB as being a camera, so you can record the resulting video on any kind of computer without installing extra drivers. All in all, it’s an FPGA-video extravaganza with a bunch of open-source software support behind it. Very impressive, [Tim]!

Why Aren’t We Arguing More About Mr Robot?

Editor’s note: Thar be spoilers below.

Showing any sort of ‘hacking’ on either the big screen or the small often ends in complete, abject failure. You only need to look at Hackers with its rollerblading PowerBooks, Independance Day where the aliens are also inexplicably using PowerBooks, or even the likes of Lawnmower Man with a VR sex scene we keep waiting for Oculus to introduce. By design, Mr Robot, a series that ended its first season on USA a month ago, bucks this trend. It does depressed, hoodie-wearing, opioid-dependant hackers right, while still managing to incorporate some interesting tidbits from the world of people who call themselves hackers.

Desktop Environments

In episode 0 of Mr Robot, we’re introduced to our hiro protagonist [Elliot], played by [Rami Malek], a tech at the security firm AllSafe. We are also introduced to the show’s Macbeth, [Tyrell Wellick], played by Martin Wallström]. When these characters are introduced to each other, [Tyrell] notices [Elliot] is using the Gnome desktop on his work computer while [Tyrell] says he’s, “actually on KDE myself. I know [Gnome] is supposed to be better, but you know what they say, old habits, they die hard.”

[Elliot], running Kali with Gnome
[Elliot], running Kali with Gnome
While this short exchange would appear to most as two techies talking shop, this is a scene with a surprisingly deep interpretation. Back in the 90s, when I didn’t care if kids stayed off my lawn or not, there was a great desktop environment war in the land of Linux. KDE was not free, it was claimed by the knights of GNU, and this resulted in the creation of the Gnome.

Subtle, yes, but in one short interaction between [Elliot] and [Tyrell], we see exactly where each is coming from. [Elliot] stands for freedom of software and of mind, [Tyrell] is simply toeing the company line. It’s been fifteen years since message boards have blown up over the Free Software Foundation’s concerns over KDE, but the sentiment is there.

Biohacking

There’s far more to a hacker ethos than having preferred Linux desktop environments. Hacking is everywhere, and this also includes biohacking, In the case of one Mr Robot character, this means genetic engineering.

In one episode of Mr Robot, the character Romero temporarily gives up his power in front of a keyboard and turns his mind to genetics. He “…figured out how to insert THC’s genetic information code into yeast cells.” Purely from a legal standpoint, this is an interesting situation; weed is illegal, yeast is not, and the possibilities for production are enormous. Yeast only requires simple sugars to divide and grow in a test tube, marijuana actually requires a lot of resources and an experienced staff to produce a good crop.

Life imitates art, but sometimes the reverse is true. Just a few weeks after this episode aired, researchers at  Hyasynth Bio announced they had genetically modified yeast cells to produce THC and cannabidiol.

The promise of simply genetically modifying yeast to produce THC is intriguing; a successful yeast-based grow room could outproduce any plant-based operation, with the only input being sugar. Alas, the reality of the situation isn’t quite that simple. Researchers at Hyasynth Bio have only engineered yeast to turn certain chemical precursors into THC. Making THC from yeast isn’t yet as simple as home brewing an IPA, but it’s getting close, and a great example of how Mr Robot is tapping into hacking, both new and old.

Why Aren’t We Arguing More About This?

The more we ruminate on this show, the more there is to enjoy about it. It’s the subtle background that’s the most fun; the ceiling of the chapel as it were. We’re thinking of turning out a series of posts that works through all the little delights that you might have missed. For those who watched and love the series, what do you think? Perhaps there are other shows worthy of this hacker drill-down, but we haven’t found them yet.

A Third Scale Mini PowerMac

We’re surrounded by tiny ARM boards running Linux, and one of the most popular things to do with these tiny yet powerful computers is case modding. We’ve seen Raspberry Pis in Game Boys, old Ataris, and even in books. [Aaron] decided it was time to fit a tiny computer inside an officially licensed bit of miniature Apple hardware and came up with the Mini PowerMac. It’s a 1/3rd scale model of an all-in-one Mac from 1996, and [Aaron] made its new hardware fit like a glove.

Instead of an old Mac modified with an LCD, or even a tiny 3D printed model like Adafruit’s Mini Mac Pi, [Aaron] is using an accessory for American Girl dolls released in 1996. This third-scale model of an all-in-one PowerPC Mac is surprisingly advanced for something that would go in a doll house. When used by American Girl dolls, it has a 3.25″ monochrome LCD that simulates the MacOS responding to mouse clicks and keypresses. If you want to see the stock tiny Mac in action, here’s a video.

The American Girl Mini Macintosh is hollow, and there’s a lot of space in this lump of plastic. [Aaron] tried to fit a Raspberry Pi in the case. A Pi wouldn’t fit. An ODROID-W did, and with a little bit of soldering, [Aaron] had a computer far more powerful than an actual PowerMac 5200. Added to this is a 3.5″ automotive rearview display, carefully mounted to the 1/3rd size screen bezel of the mini Mac.

The rest of the build is exactly what you would expect – a DC/DC step down converter, a USB hub, and a pair of dongles for WiFi and a wireless keyboard. The software for the ODROID-W is fully compatible with the Raspberry Pi, and a quick install of the Basilisk II Macintosh emulator and an installation of Mac OS 7.5.3 completed the build.

Computer Learns To Hack Chess

A lot of computers can play chess. [Matthew Lui’s] Giraffe is a chess playing computer, but unlike other common chess programs, Giraffe taught itself to play. It apparently learned pretty well, too, since it is rated as an International Master on the FIDE scale (putting it in the top 2.2% of players. The top chess playing computers clock in at super grandmaster level but they are not self-taught).

Continue reading “Computer Learns To Hack Chess”

Arduino’s Long-Awaited Improved WiFi Shield

Announced at the 2014 Maker Faire in New York, the latest Arduino WiFi shield is finally available. This shield replaces the old Arduino WiFi shield, while providing a few neat features that will come in very handy for the yet-to-be-developed Internet of Things.

While the WiFi Shield 101 was announced a year ago, the feature set was interesting. The new WiFi shield supports 802.11n, and thanks to a few of Atmel’s crypto chip offerings, this shield is the first official Arduino offering to support SSL.

The new Arduino WiFi Shield 101 features an Atmel ATWINC1500 module for 802.11 b/g/n WiFi connectivity. This module, like a dozen or so other WiFi modules, handles the heavy lifting of the WiFi protocol, including TCP and UDP protocols, leaving the rest of the Arduino free to do the actual work. While the addition of 802.11n  will be increasingly appreciated as these networks become more commonplace, the speed offered by ~n isn’t really applicable; you’re not going to be pushing bits out of an Arduino at 300 Mbps.

Also included on the WiFi shield is an ATECC508A CryptoAuthentication chip. This is perhaps the most interesting improvement over the old Arduino WiFi shield, and allows for greater security for the upcoming Internet of Things. WiFi modules already in the space have their own support for SSL, including TI’s CC3200 series of modules, Particle‘s Internet of Things modules, and some support for the ESP8266.