Posts with «leonardo» label

Custom Macro Keyboard With RGB Lighting

From the smallest 60% keyboards for those with no desk space to keyboards with number pads for those doing data entry all day, there’s a keyboard size and shape for just about everyone. The only problem, even with the largest keyboards, is that they’re still fairly limited in what they can do. If you find yourself wishing for even more functionality, you might want to build something like this custom macro keyboard with built-in LED backlighting.

Rather than go with a standard mechanical keyboard switch like a Cherry MX, this build is based around TS26-2 pushbuttons with built-in LED lighting. [atkaper] only really needed one button for managing the mute button on MS Teams, but still built a total of eight switches into this keyboard which can all be individually programmed with different functions. The controller is an Arduino Leonardo and the enclosure was 3D printed.

Paired with the classic IBM Model M keyboard, this new macro keyboard adds plenty of functionality while also having control over LED backlighting. Macro keyboards are incredibly useful, especially with their ability to easily change function with control over the software that runs on them. The key to most builds is the 32U4 chip found in some Atmel microcontrollers which allows it to easily pass keyboard (and mouse) functionality to any computer its plugged in to.

Custom Macro Keyboard With Sweet Backlighting

From the smallest 60% keyboards for those with no desk space to keyboards with number pads for those doing data entry all day, there’s a keyboard size and shape for just about everyone. The only problem, even with the largest keyboards, is that they’re still fairly limited in what they can do. If you find yourself wishing for even more functionality, you might want to build something like this custom macro keyboard with built-in LED backlighting.

Rather than go with a standard mechanical keyboard switch like a Cherry MX, this build is based around TS26-2 pushbuttons with built-in LED lighting. [atkaper] only really needed one button for managing the mute button on MS Teams, but still built a total of eight switches into this keyboard which can all be individually programmed with different functions. The controller is an Arduino Leonardo and the enclosure was 3D printed.

Paired with the classic IBM Model M keyboard, this new macro keyboard adds plenty of functionality while also having control over LED backlighting. Macro keyboards are incredibly useful, especially with their ability to easily change function with control over the software that runs on them. The key to most builds is the 32U4 chip found in some Atmel microcontrollers which allows it to easily pass keyboard (and mouse) functionality to any computer its plugged in to.

Four on the Floor for Your Virtual Race Car

There was a time when building realistic simulations of vehicles was the stuff of NASA and big corporations. Today, many people have sophisticated virtual cockpits or race cars that they use with high-resolution screens or even virtual reality gear. If you think about it, a virtual car isn’t that hard to pull off. All you really need is a steering wheel, a few pedals, and a gear shifter. Sure, you can build fans to simulate the wind and put haptics in your seat, but really the input devices alone get you most of the way there. [Oli] decided he wanted a quick and easy USB gear shifter so he took a trip to the hardware store, picked up an arcade joystick, and tied it all together with an Arduino Leonardo. The finished product that you can see in the video below cost about $30 and took less than six hours to build.

The Leonardo, of course, has the ability to act like a USB human interface device (HID) so it can emulate a mouse or a keyboard or a joystick. That comes in handy for this project, as you would expect. The computer simply has to read the four joystick buttons and then decide which gear matches which buttons. For example up and to the left is first gear, while 4th gear is only the down button depressed. A custom-cut wooden shifter plate gives you the typical H pattern you expect from a stick shift.

Of course, the joystick doesn’t have a long handle like a true stick shift, so [Oli] added some extensions. In addition, a real shifter doesn’t require you to hold it in position as a joystick would. To rectify this, the shifter plate has magnets that grab the stick and hold it. They aren’t strong enough that you can’t move the stick, but they are strong enough to keep it from moving on its own.

We noticed that the design doesn’t allow for a clutch, so it isn’t quite the same as driving a real stick. However, [Oli] mentions several upgrades he has in mind and a clutch is one of them. Some haptics would be a cool addition so could feel the gears grind if you didn’t do the shift correctly.

The last shifter we saw like this was 3D printed. It is getting harder to find a car in the US with a manual transmission, but [Kristina Panos] is definitely a fan.

KVM Uses Many Arduinos

The Arduino platform is one of the most versatile microcontroller boards available, coming in a wide variety of shapes and sizes perfect for everything from blinking a few LEDs to robotics to entire home automation systems. One of its more subtle features is the ability to use its serial libraries to handle keyboard and mouse duties. While this can be used for basic HID implementations, [Nathalis] takes it a step further by using a series of Arduinos as a KVM switch; although admittedly without the video and mouse functionality yet.

To start, an Arduino Uno accepts inputs from a keyboard which handles the incoming serial signals from the keyboard. From there, two Arduino Pro Micros are attached in parallel and receive signals from the Uno to send to their respective computers. The scroll lock key, which doesn’t do much of anything in modern times except upset Excel spreadsheeting, is the toggle switch between the two outputs. Everything is standard USB HID, so it should be compatible with pretty much everything out there. All of the source code and schematics are available in the project’s repository for anyone who wants to play along at home.

Using an Arduino to emulate a USB input device doesn’t have to be all work and no play, the same basic concept can also be used to build custom gaming controllers.

Hacking An Arduino NFC Reader With WebUSB

When [gdarchen] wanted to read some NFC tags, he went through several iterations. First, he tried an Electron application, and then a client-server architecture. But his final iteration was to make a standalone reader with an Arduino and use WebUSB to connect to the application on the PC.

This sounds easy, but there were quite a few tricks required to make it work. He had to hack the board to get the NFC reader’s interrupt connected correctly because he was using a Leonardo board. But the biggest problem was enabling WebUSB support. There’s a library, but you have to change over your Arduino to use USB 2.1. It turns out that’s not hard, but there’s a caveat: Once you make this change you will need the WebUSB library in all your programs or Windows will refuse to recognize the Arduino and you won’t be able to easily reprogram it.

Once you fix those things, the rest is pretty easy. The PC side uses node.js. If you back up a level in the GitHub repository, you can see the earlier non-Arduino versions of the code, as well.

If you want to understand all the logic that went into the design, the author also included a slide show that discusses the three versions and their pros and cons. He did mention that he wanted a short-range solution so barcodes and QR codes were out. He also decided against RFID but didn’t really say why.

NFC business cards are a thing. You can also use them to catch some public transportation.

TAMI is an interactive trig learning table

Trigonometry is a struggle for some students. Perhaps one of the reasons for this is that instruction can be something of a one-way street, and concepts can be hard to grasp until more technical building blocks are learned. 

As seen here, researchers at the Universidad del Desarrollo in Chile aim to change that with a trigonometry tabletop display called TAMI, or Tangible Mathematics Interface. This nearly horizontal screen shows mathematical relationships, while allowing students to interact with them using physical controls. 

The most prominent controller here is a large rotary wheel. Students rotate this to modify the angle shown in the middle, and observe how concepts like sine and cosine react to this manipulation. An Arduino Leonardo takes input from this and other controls, and passes it along to a computer. This then handles on-screen info and even plays sounds as needed!

Automate your hydroponic garden with HydroBot

Hydroponics seems like a great way to get fresh vegetables at a cheap price, but as Scott Paterson and Max Knight found out, doing this type of gardening well can take a lot of work. To help take the guesswork and hassle out of the process, the duo has created HydroBot — an automated garden minder that uses an Arduino Leonardo along with a Raspberry Pi Zero for control.

HydroBot allows you to remotely monitor your setup, and automate tasks using wireless switching for lights and fans, as well as two pumps built into the apparatus’ housing to add nutrients to your grow-water. 

The device is currently available on Kickstarter, and is also open source project, so you’ll be able to fix any bugs or even modify its behavior as needed!

Control discarded copier and tape drive-style displays with Arduino

As hardware hackers, we’re always on the lookout for discarded components that can be re-purposed into something even more awesome. One such class of component that you may find is the controller-less graphics LCD modules, which can be found on old copiers, tape libraries, and the like.

This project by Ivan Kostoski shows how to drive one of these displays with a 320×240 resolution. He’s tested his code using several types of Arduino board, such as the Uno and Leonardo, using minimal external components. 

Summary
Repository contains code samples for driving 4-bit parallel controllerless graphics LCD (CLGLCD) module with AVR MCU on an Arduino board, using minimal external components and staying within Arduino IDE.

4-bit Controllerless Graphics LCD modules
Controllerless graphics LCD modules are antiques that can be salvaged from old copiers, tape libraries, etc… They commonly are missing, well, the controller chip, the one with the memory. Don’t go buying one of these, for Arduino usage, even if you find them on sale. They are usually industrial, have poor viewing angles, generally slow response time, and pain to work-with. There, I said my peace… But if you already have one, their size (i.e. 5.7in) or simplicity can have its uses and beauty.

I have tested this code with 320×240 STN LCD monochrome module marked as F-51543NFU-LW-ADN / PWB51543C-2-V0, salvaged some time ago from retired tape library, without the controller module (which it appears is based on FPGA and wouldn’t be of much use anyway).

The same type of interface (4-bit data) with various signal names is present on many industrial modules based on multiplexed column and common row LCD drivers, like LC79401/LC79431. Or this is what is behind the controller IC. They all have some variations like LCD drive voltage (positive or negative, depending on temperature and size of the module), backlight (LED/CCFL), some logic quirks (i.e. CL2 is ignored while CL1 is up, etc…), so maybe this code can be adapted to other controllerless modules. Module’s datasheet is necessity for the connector pinouts and timing requirements. Some modules may even generate LCD drive voltage internally, and outputting it on a pin so actual V0 driving voltage can be adjusted.

More info on the build/technique is found on GitHub, where you can also download project code and find more background on how interfacing with these devices works.

Video stream surfing with Arduino!

While channel surfing might increasingly seem to be a thing of the past, Kevin Darrah demonstrates that it’s possible to control your streaming computer with a traditional TV remote. 

His simple solution reads IR signals with an IR detector module, which can then be passed along and translated into USB keypresses for computer control.

You can see his experimental Arduino Leonardo setup in the video below, which takes advantage of the board’s ATmega32U4 chip to emulate USD keyboard functions directly.

Fun project here that could have a lot of uses – basically a TV remote to USB translator, so could think of a lot of ways to use something like this.  For me, I just wanted an easy way to channel surf using the same TV remote that came with the TV.  For this, I just read in the IR codes form the remote, then map them to key-strokes to do different things.  I could see the up/down left/right keys being used to drive the mouse around… lol, that might be my next project!

The bulk of the clip, however, is around a discussion on decoding IR signals and the programming involved (code available here), starting at about 6:00 in.

Play Mario Kart: Double Dash with a hacked VTech steering wheel

YouTuber “Insert Controller Here” has been creating gaming controllers out of a variety of objects, like bananas, mayonnaise, and meat. For his latest iteration, the YouTuber decided to convert a VTech Turn and Learn Driver into—what else?—a Mario Kart: Double Dash steering console.

As seen in the video below, the build consists of disassembling the toy, then soldering wires to the correct points to recreate steering wheel input, braking, and throttle. An Arduino Leonardo is used for the gaming interface, allowing Mario and Luigi to make it around the track by turning the wheel and applying brakes, while the accelerator is simply “shifted” into place.