While touchscreens are nice, wouldn’t it be even better if you could simply wave your hand to your computer to get it to do what you want? That’s the idea behind this Iron Man-inspired gesture control device by B. Aswinth Raj.
The DIY system uses an Arduino Nano mounted to a disposable glove, along with hall effect sensors, a magnet attached to the thumb, and a Bluetooth module. This smart glove uses the finger-mounted sensors as left and right mouse buttons, and has a blue circle in the middle of the palm that the computer can track via a webcam and a Processing sketch to generate a cursor position.
You can see it demonstrated in the video below, drawing a stick man literally by hand, and also controlling an LED on the Nano. Check out this write-up for code and more info on the build!
A while back, I wrote an article about Malduino, an Arduino-based, open-source BadUSB device. I found the project interesting so I signed up for an Elite version and sure enough, the friendly postman dropped it off in my mail box last Friday, which means I got to play around with it over the weekend. For those who missed the article, Malduino is USB device which is able to emulate a keyboard and inject keystrokes, among other things. When in a proper casing, it will just look like a USB flash drive. It’s like those things you see in the movies where a guy plugs in a device and it auto hacks the computer. It ships in two versions, Lite and Elite, both based on the ATmega32U4.
The Lite version is really small, besides the USB connector it only contains a switch, which allows the user to choose between running and programming mode, and a LED, which indicates when the script has finished running.
Original Malduino Elite sketch and Lite prototype
The Elite version is bigger, comes with a Micro-SD card reader and four DIP switches, which allow the user to choose which script to run from the card. It also has the LED, which indicates when a script has finished to run. This allows the user to burn the firmware only once and then program the keystroke injection scripts that stored in the Micro-SD card, in contrast to the Lite version which needs to be flashed each time a user wants to run a different script.
These are the two Malduinos and because they are programmed straight from the Arduino IDE, every feature I just mentioned can be re-programmed, re-purposed or dropped all together. You can buy one and just choose to use it like a ‘normal’ Arduino, although there are not a lot of pins to play around with. This freedom was one the first things I liked about it and actually drove me to participate in the crowd-funding campaign. Read on for the full review.
The Hardware
Malduino Elite vs USB flash drive
So the Elite board arrived as schedule and I found myself some time to look an it. Despite being longer than the Lite version, it’s still quite small, measuring roughly 4.6 cm x 1.1 cm (around 1.8 in x 0.43 in), which you can easily adapt to an old USB case, although you’ll have to cut some holes for the DIP switches and the Micro-SD card. In the crowd-funding campaign, the original sketch was for a 3 DIP switch version but the final Elite has four, which I found nice. I plugged it in to an old computer, after some consideration about which firmware it could ship with and what it could do to my laptop, and sure enough a red LED appeared. And that was it. Nothing else.
After playing around with the switches and exercising some RTFM, I realised that the firmware it ships with is probably some sort of Q.C. test for the dips, which makes the Malduino output the numbers 1 to 4 (actually simulating a keypress 1 to 4), depending on which switches are ON. So far so good, it works and I’ve seen worse PCB boards than this one. The board has holes for six pins, which I did not trace to the micro-controller and I don’t know what they are for.
The Setup
Setting up the Malduino requires that you have the Arduino IDE installed and up to date. You’ll need to open up the board manager and install the Sparkfun boards since the Elite is programmed as a ‘Sparkfun Pro Micro’ running at 3.3 V and 8 MHz. Then you need to go the Malduino Script Converter website which serves several purposes:
It allows to convert scripts between the Lite and Elite versions
It allows you to choose your keyboard layout language
It auto generates the Arduino project for you to import to the IDE
For the Elite version, just create a simple or even empty script to download the project, since when in ‘normal’ operation you will just flash the Malduino once and then use the Micro-SD card to store new scripts.
A note on flashing, if you are using a Debian-based distribution you might come across some problems like I did and not be able to flash the device. Like the user on this most useful post, my modem-manager was trying to talk with the Malduino after every reset and confused AVRDUDE to death. The solution is to add udev rules to “/etc/udev/rules.d/77-mm-usb-device-blacklist-local.rules”, kudos to [socrim]:
Since I’m running Linux, a quick shortcut to run a command is the ALT-F2 combination. So I script that into a file and save it to 1111.txt. The Elite searches the Micro-SD card for a file corresponding to the current dip switch state. Lets say the dip switch 2 and 4 are ON. In this case, the software tries to find the file named 0101.txt and parse its contents (as in dip switch order 1,2,3,4 and not the binary representation of the number 2 and 4) . When it finishes, the red LED starts flashing quickly. My simple script was:
DELAY 2000
ALT F2
DELAY 1000
STRING xterm
DELAY 1000
ENTER
DELAY 1000
STRING id
DELAY 1000
ENTER
But it was not working. Almost all commands worked but the ALT-F2 combo was not functioning properly. Close, but no cigar. No ALT-F2, no run command window. I’ve already lazy-browsed the source code a bit because I really didn’t have a lot of time on my hands but I needed to figure this out. The offending code was this:
A custom equals function was receiving size 3 for the strings of the Function keys, like “F2”. It was ok for “F10”, “F11” and “F12”, but failed for the rest of the keys. Changing 3 to 2 did the trick, but my Portuguese keyboard layout started to interfere with other test scripts. So I changed the code to include PT and UK layouts, changing them in a #define at compile time.
It would be cool if it was possible to access the SD card from the computer as a regular USB volume. I don’t know exactly how feasible that is, but it does not come with the current firmware. I still wanted to be able to output the content of an arbitrary file on the SD card to the screen, so I added another script function called ECHOFILEHEX that outputs the content of a file in the SD card as escape characters. For example, if the file a.txt contains “AAA”, the script command ECHOFILEHEX a.txt would output “\x41\x41\x41”. This can be useful to echo binary files into printf or echo -e, in Linux hosts at least.
Meanwhile, I had some trouble reading the original code. You know, we all have different programming styles. Don’t get me wrong, I’ve been known to write some messed-up spaghetti code. I sometimes browse old projects looking for some libs or classes I coded and wonder ‘who the heck wrote this steaming pile of code?’ Me, it was me. Anyway, I started to change a bit here and there and ended up changing pretty much the entire code. That’s the beauty and the curse of open-source. If you’re curious you can check it out here.
Conclusion
All in all, and despite some bumps, I’m quite pleased with Malduino. It is what I expected: an open platform for BadUSB attacks that’s in its infancy. It’s awesome that we can all tinker with it, modify it, make it better or just make it suit our needs. I hope a real community can start so we can see its full potential emerge. My short list includes simulating other USB devices, better SD card management, and expanding the device via the unused pins. What would you add?
It’s a long way to go and a lot can go wrong, so good luck with the project [Seytonic]!
What has eight legs, a tail, and is powered by an Arduino Mega? The ClearWalker, of course!
This Strandbeest-style walker employs two motors, controlled by individual H-bridge relay modules to traverse forwards, backwards, and slowly rotate to one side or another via a hesitating leg motion. You can see how the electronics (including a bunch of LEDs) were integrated into this build in the video below.
As multitools have lots of different functions in one case, so [Shadwan’s] clock design incorporates a multitude of features. He started the design as a binary clock using a Fibonacci spiral for the shape. However, the finished clock has four modes. The original binary clock, an analog clock, a flashlight (all lights on), and a disco mode that strobes multiple lights.
[Shadwan] used Rhino to model the case and then produced it using a laser cutter. The brains are — small wonder — an Arduino. A 3D-printed bracket holds everything together. You can see the result in the video below.
The clock was a school project and used a Neopixel ring. The students had a 16 position ring, which is not enough to do a 24-hour clock so they settled on a 12-hour design. The LED color, however, changes between AM and PM.
The paper included with the design said that research didn’t turn up any other binary clocks using Neopixels. We found that hard to believe, but it might be true. We certainly didn’t find any in our archives, although there are plenty of non-binary clocks out there.
YouTuber “HomoFaciens” had quite a bit of square tubing to cut for his latest CNC router. As he’s known for combining simple tools with creative uses of electronic components, he came up with a jig that helps him precisely position his cuts.
This device works using an encoder made out of paper, tape, and a nail sharpened on both ends. Two IR emitter/receiver pairs send pulses to an Arduino Uno, which displays this number on an LCD screen. The machine is calibrated by measuring a known length of tubing verses the number of pulses for an actual distance measurement. Once set up, not only can the digital ruler be used to properly cut tubing, but can be put on a drill press for accurate hole placement!
It used to be hot air soldering gear was exotic, but not anymore. There are plenty of relatively inexpensive choices. Many of these appear to be the same despite having different brand names and model numbers. One that is common and inexpensive is the 858D. These run about $50. [Gabse] has one and decided to upgrade it using some open source controller hardware and software. There wasn’t a complete guide, so he created one himself.
According to the original GitHub page, the controller will work with the Youyue-858D and any clones. However, there are others like the Atten 858D that use a different controller. In addition, there have been several variants. [Gabse’s] guide is for the latest version. Information on other versions and brands might be on this discussion board thread.
The new controller and firmware offer better temperature regulation, a safety feature that prevents the handpiece from heating up if power is applied when the handpiece is not docked, fan fault detection, a cold air mode, a sleep mode, and more. There are PCBs available from OSH Park if you want to attempt it yourself. There are also a few YouTube videos showing the custom firmware, one of which appears below.
In addition to the controller change, [Gabse] shows you some optional tweaks to make the handpiece more robust, change the power plug, and make the cradle sensor more reliable. Worthwhile changes and all well-suited for the processing power of the Arduino.
OK, we haven’t heard of a Ford Cylon either. However, there is now a Mustang Cobra out there that has been given a famous Cylon characteristic. [Monta Elkins] picked himself up an aftermarket third brake light assembly, hacked it, and installed it on said Mustang.
The brake light assembly contains 12 LEDs, which unfortunately, are not individually addressable. Additionally, by the looks of it, the brake light housing was not meant to be opened up. That didn’t get [Monta] down though. There’s more than one way to skin a cat, but he chose to use a hot knife to open the assembly, which worked quite well. A rotary cutter tool was used to cut the traces between the LEDs allowing them to be individually controlled with an Arduino. A Bluetooth module allows him to control the new brake light from his smartphone. There are different modes (including a special mode that he shows off at the end of the video) that can be selected via a Bluetooth Terminal app.
There is no schematic or code link in the video itself or the description, but [Monta] did hit the high points. Therefore, it shouldn’t be too hard to replicate.
We’ve all seen hamsters in a cage, furiously running nowhere. Perhaps you’ve thought about the pointlessness of this activity, before going to the gym to lift weights up and down or run on a treadmill. From an outside perspective, both activities seem pointless, but when you realize the benefits, maybe tracking what “feats of strength” you’re able to accomplish, things become much more clear.
As seen on Hackaday, in order to track the activity of his daughter’s hamster, John Mueller implemented an Arduino Uno-based system that records revolutions using a magnet and a reed switch. Every time the magnet on the wheel passes the fixed switch, it triggers an Arduino input, recording how many revolutions, and thus how many miles the little guy runs each night. Results are quite impressive considering its size, recording over 3.5 miles on one occasion!
This type of encoder concept could be used in many different situations, such as logging bicycle speeds, or tracking motor stats.
If you’re familiar with the Segway or other vehicles that balance in what is known as an “inverted pendulum” configuration, you may think that while interesting, creating something similar would be too complicated or out of your budget. Though perhaps still not simple, Joop Brokking takes you through his design for this type of bot in the video seen here, making it accessible if you’d like to build your own.
The robot, which will cost about $80 in parts, uses two stepper motors for greater movement precision than could be had with normal DC models, and employs an Arduino Pro Mini, along with an MPU-6050 accelerometer/gyroscope for control. It can be driven around by a Wii U-style nunchuck, which transmits to the robot via an Arduino Uno and wireless transceiver module.