Use the Touch Board alongside VLC to control videos on a laptop or desktop computer
Take your Touch Board project to the next level by controlling videos playing on a laptop or desktop. In this tutorial, you will learn how to set up the Touch Board as a keyboard, which will then be used to control the playback of videos through an application on your computer. The tutorial is based around VLC media player from Videolan. VLC is the most popular media player, not only because it is open source but also because it can play so many media files and file formats.
We love it when you share your projects! Post your project on Instagram, YouTube, or Twitter, and make sure to tag @bareconductive or use #bareconductive. You can also send your videos and photos to firstname.lastname@example.org so we can post them on our site for the world to see.
You will need:
- 1 x Touch Board
- Electric Paint 10ml, 50ml or 1l
- 1 x USB Micro B to USB A or USB C (depending on your computer's USB port type)
- 1 x Computer running Mac OS, or Windows
Step 1 Download VLC and upload the code to the Touch Board
If you haven't set up your Touch Board, then check out the setup tutorial. Upload the "HID_Keyboard" code to the Touch Board, ensuring you have selected the right settings for the Touch Board. This code will simulate keystrokes when you touch the electrodes.
Step 2 Open VLC and set the hotkeys
With the right code on your Touch Board, open Videolan's VLC media player. Next, open the preferences of VLC and head to "Hotkeys." Here, you can assign keyboard strokes to the actions of the VLC media player. By default, electrode 0 is assigned the character "J." If you double click "Play/Pause," you can press electrode 0 to assign it to play/pause the video. Press "Save" and quit VLC and reopen it for the changes to take effect.
Step 3 Test with your files
Next, drag a video or a file you want to play into the media player. It doesn't matter what format your videos are, VLC is able to handle most video formats. Try pressing electrode 0. It should play and pause the video.
You can also assign the other electrodes to the hotkeys of VLC. For example, use electrode 1 to "Next" and electrode 2 to "Previous."
Step 4 Paint an interface
Now that the Touch Board is working with VLC media, you can paint your interface with Electric Paint. One simple idea is to paint a play/pause button or maybe a next and a forward button.
Step 5 Next steps
You are not limited to Videolan's VLC. You can also use a projection mapping software as a media player to play videos. You can also use VLC as your multimedia player and play audio files instead of just videos.