Posts with «leonardo» label

Morse code input for Android with Arduino

Morse code may not be as widely used as in its heyday, but it still certainly has its adherents. One avid user is Tanya Finlayson, who has been using this as her method of communication for roughly 40 years. Now, with the Gboard phone keyboard supporting input via dots and dashes, the world of Android computing has been opened up to her as well.

In order to get button presses to the phone, Ken Finlayson used an Arduino Leonardo to read inputs from a trio of buttons, indicating dot, dash, and mode select. The third button allows for phone navigation in addition to text input. Because of its built-in HID capabilities via the ATmega32U4 chip, the Leonardo is a great choice for this application, demonstrated in the video below. 

Many people cannot use keyboards and touchscreens to control their digital devices. Instead, they use custom hardware switches that emulate typing, swiping, and tapping. The Android operating system provides software that allows these switches to control Android devices, and recently Google provided a new Morse Keyboard within the Gboard keyboard for people who find this method easier for text entry.

This experiment is a DIY hardware adapter that enables assistive tech developers to connect existing switch based input systems to their Android device. Once connected, 2 switch assistive systems (with an additional switch for mode switching) can control both the standard Android accessibility func

tions as well as text entry through Morse on Gboard.

This experiment is built using Arduino and is compatible with most standard assistive 2 switch systems with 1/8” mono outputs.

Arduino Blog 12 Jul 22:12

Play Striker Air Hockey on a capacitive touch surface

After discovering capacitive touch interactions with a Makey Makey device and an Arduino Leonardo, Jason Eldred realized it could also be used to control the Unity game engine. After a night of hacking, he had a basic interface that could change the scale of a virtual circle. From there, he teamed up with Alex L. Bennett to produce an art installation called Bee that invited users to interact with it by physically touching a panel to change graphics on the panel itself and a screen in front of them.

While not meant as a game per se, after more experimentation including work by Gabe Miller and Dustin Williams, this interactive display method was finally turned into a virtual air hockey table via a giant crisscrossing grid of copper tape and wires.

In the game, two players push a virtual puck projected onto a horizontal surface for colorful AR interactions at a very low cost. You can see it in action below, and read more about the project on DigiPen’s website and in Gamasutra’s recent article.

Pour Reception turns water into radio controls

Using a capacitive sensing arrangement, artists Tore Knudsen, Simone Okholm Hansen, and Victor Permild have come up with a way to interact with music with two glasses of water.

One pours water into a glass to turn the radio on. Channels can then be changed by transferring water from one glass into the other, and fine-tuned by touching the outside of container. Volume can even be adjusted by poking a finger into the water itself.

An Arduino Leonardo is used to pick up capacitive signals, and data is then sent a computer where a program called Wekinator decodes user interactions.

Pour Reception is a playful radio that strives to challenge our cultural understanding of what an interface is and can be. By using capacitive sensing and machine learning, two glasses of water are turned into a digital material for the user to explore and appropriate.

The design materials that we have available when designing digital artifacts expands along with the technological development, and with the computational machinery it is possible to augment our physical world in ways that challenges our perceptions of the objects we interact with. In this project, we aim to change the users perception of what a glass is – both cultural and technical.

You can see it in action below, and read more about project in its write-up here.

Antique organ speaks clues at an escape room

When tasked with converting an antique pump organ—sort of a miniature version of a full-sized pipe organ—into part of an escape room puzzle, hacker Alec Smecher decided to turn it into a vocal MIDI device.

To accomplish this, he embedded switches in each of the keys, then wired them into an Arduino Leonardo embedded in the 100-year-old organ to act as input to a desktop computer. Information is translated into browser commands using the Web MIDI API, which controls the Pink Trombone application in order to imitate a human vocal tract.

A common stop on an organ is called “Vox Humana”, or “Human Voice” in Latin. This is supposed to somehow sound like a choir or soloist, generally by adding a tremolo effect. It’s not effective — all pump organ stops sound like pump organ stops. I wanted to modify this stop so that engaging it would sound like a human voice — and not at all like a musical instrument.

The results–shown in the first video below–sound almost but not quite human, certainly adding to the tension and mystery of the escape room. Be sure to read more about Smecher’s project here.

Arduino Blog 17 Oct 20:25

Create a gesture control unit for your PC using Skywriter and Arduino

While keyboards are great, and custom shortcuts can make things even better, why not do away with buttons and knobs altogether, controlling your computer instead via simple gestures? Maker Ben James has done just this, creating a unique interface using a Skywriter device to pick up finger movements, along with an Arduino Leonardo to emulate a keyboard on his laptop.

Since the Skywriter can detect a number of gestures, James assigned various swipes, taps and circular motions to keyboard commands. As you can see in the video here, the results are pretty neat. 

More info on this project can be found on his blog post, and its code is available on GitHub.

Over-engineered, Arduino-powered closet lights

If you’re faced with a closet that doesn’t have any lights inside, you simply could go and find puck lights at most retail stores. But, if you’re Dillon Nichols, you buy a set of lights, and enhance them with a wired power supply and automatic Arduino control.

To accomplish this, Nichols decoded the infrared remote control signal to his puck lights using an Arduino Leonardo, then set up things up to sense the door’s opening via a physical switch and signal the lights accordingly. Now when he opens the closet, lights automatically shine down and fade out when it’s closed.

He also added a timer, so that they turn off after 10 minutes automatically if he forgets to shut the door. Looking for an over-engineered, non-permanent solution for yourself? You can check out his detailed write-up here and find the code for his build on GitHub.

Hack an old typewriter with Arduino for digital input

Mechanical typewriters are, for the most part, a thing of the past. Though the tactile feedback of these machines is interesting, as is the ability to directly mark on a piece of paper, they lack the important ability to input instructions into a modern computer. Konstantin Schauwecker, not satisfied with this analog-only output, decided to retrofit a German Olympia Monica typewriter as a unique digital user input device.

To accomplish this, he created a PCB with phototransistors that sense when the linkages for each key are pushed down. The result is a keyboard that functions perfectly well as a manual typewriter, and pushes this data to a computer using an Arduino Leonardo.

I modified a vintage type writer to function as a USB keyboard using an Arduino and 50 phototransistors. The typewriter is a German Olympia Monica that I bought at a local flea market. For this project I created a simple PCB that carries the phototransistors and several multiplexers and decoders. The PCB is connected to the Arduino through a ribbon cable. I used an Arduino Leonardo, which can function as a USB input device.

Check out Schauwecker’s write-up for more info on this clever build.

An experimental game with a conductive rubber band controller

RubberArms is an experimental rubber band game, created by Robin Baumgarten at the Global Game Jam 2017 in Yverdon-les-Bains, Switzerland.

The controller uses a conductive rubber cord from Adafruit that changes resistance as it’s stretched. This resistance is measured by an Arduino Micro/Leonardo (or a Teensy 3.2), which acts as a USB joystick sending signals to Unity3D. (The game is coded in Unity3D using Spring Joints and Line Renderers.)

At this point, the game is a simple prototype where you control the distance of two characters whose arms stretch whenever you stretch the rubber band, throwing little ‘Bleps’ around. You can read more about RubberArms on Baumgarten’s page, as well as his earlier project “Line Wobbler” here.

Get your DDR on with an Arduino dance pad

Alex of the YouTube channel “Super Make Something” is a huge fan of Dance Dance Revolution (DDR), and still has to play the game whenever he steps foot into an arcade. However, with the number of arcades slowly declining, the Maker has decided to bring that experience into his living room with a USB DDR dance pad.

And yes, you could always buy a metal dance pad but rather than spend $300, why not build your own? That is exactly what Alex has done using some easy-to-find materials: a 35″ x 35” slab of plywood for the base, four 1” x 35” pieces of wood for the border, five 11” x 11” pieces of MDF for the stationary panels, four 9″ x 9” pieces of cardboard for the riser panels, 12 metal button contacts out of aluminum, four 11” x 11” MDF button pads, acrylic sheets for the dance surface, and plenty of paint and graphics for the finishing touch.

The dance pad itself is based on pull-up resistors and an Arduino Leonardo, which is housed inside a 3D-printed enclosure. The Arduino includes an ATmega32U4 chip that can be programmed to act as a USB input device. The working principle here is that the MCU sends out a keystroke every time a button panel is stepped on. Alex provides a more in-depth breakdown of how it works in the video below! Meanwhile, the Arduino code can be downloaded here.

Quickie USB Keyboard Device

There are a ton of applications that we use that can benefit from keyboard shortcuts, and we use ’em religiously. Indeed, there are some tasks that we do so often that they warrant their own physical button. And the only thing cooler than custom keyboards are custom keyboards that you’ve made yourself.

Which brings us to [Dan]’s four-button Cherry MX USB keypad. It’s not really all that much more than four keyswitch footprints and an AVR ATmega32u4, but that plus some software is all you really need. He programs the Arduino bootloader into the chip, and then he’s using the Arduino Leonardo keyboard libraries. Bam! Check out the video below.

We see this design much more as a demo or collection of building-blocks than necessarily a one-size-fits-all solution. You might need five buttons, or want a different layout, or… It’s all open-source, so go nuts. And you’re not limited to key-clicks either — mouse buttons or even multiple scripted actions are within easy reach.

Building a special-function USB keypad or gaming device used to be hard work. But today between hardware and software design availability, it’s child’s play. Whether you need a footboard, a single-handed chording keyboard, or even just to update an old typewriter, the ability to control the input device that we use for eight hours per day is liberating. Experiment!


Filed under: Arduino Hacks, peripherals hacks