the touch board as an hid keyboard - touch board-ITATOUCH-img
loading

the touch board as an hid keyboard - touch board

by:ITATOUCH     2020-07-08
the touch board as an hid keyboard  -  touch board
Write messages with your TouchPad or control game!
Have you ever thought about using your TouchPad as a hid keyboard input for your computer?
You may want it to control your favorite online arcade game, or more like Makey (
But only one hand is needed to start! ).
Or maybe you have another use that requires a key.
Anyway, follow the steps below and soon you can type with the power of capacitive touch.
For more project ideas, please visit www. bareconductive.
ComTo start you need: 1 x touchpad 1 x USB Cable 1 x computer this tutorial assumes that you have installed the Arduino and set it to use the TouchPad.
If not, follow the link below and go back here as soon as you have everything set up.
In order for the TouchPad to work like a keyboard, we need to re-program and map the electrodes to the keystrokes.
Fortunately, we have written this code, so all you need to do is download it at the link below, decompress it, and put the hid _ keyboard folder in the Arduino Sketchbook folder: my documentation/Arduino MacDocuments/Arduino linux (Ubuntu)
Use the ArduinoDownload touchpad HID keyboard code to plug the touchpad into the computer via a USB cable.
Make sure the power switch on the board is set to on.
Open the Arduino IDE and then open the hid-keyboard sketch from Sketchbook.
Make sure to select the bare conductive touchpad under the tool
> The motherboard and the correct serial number (TTY)
Select port under Tools->Port. Click File-
> Upload push the code to the TouchPad.
The RX and TX LEDs on the TouchPad will flash and the Arduino IDE should say "Upload done ".
"Open a text editor such as TextEdit, Gedit, or notepad.
The touch E0 on the TouchPad will output the letter J, which you should see on the text editor screen.
You should see from E0 to E11: If this works-congrats you, your code works!
If you open the garage band and press each electrode in turn, you will hear the scale being played.
You may notice that there is no R in a string of letters above-this is due to the way the garage band maps keys to notes.
We chose the default letters in the code to skip the R so it works well in the garage band-but you can change them to whatever letter you like in the steps below.
Please double if you have difficulty
Check if the motherboard is open and try to reopen
Upload the code to the motherboard.
You may have to hold down the reset button and release the Arduino IDE only if it says upload.
It would be great if the letters we chose were your favorite, but what if they weren't?
Don't worry-you can easily change them by editing the keyMap variables in line 34 of the hid _ keyboard. ino.
You can see some non-
Print keyboard strokes on 35 lines, and the Arduino keyboard modifier reference link here has many other valid keys to choose from.
The position of the in-parentheses key determines its mapping-the first mapping in the array to E0, the second mapping to E1, and so on.
Do not place more than 12 different items in the array, otherwise the code will not work.
Also, don't forget that single quotation marks are required around normal letters, such as "a", while special keys are named KEY_F1 (
"F1" key on keyboard).
Now that we have the keyboard code and can map it to our favorite key, what should we do with it?
As we mentioned earlier, the stock code works well with GarageBand to play a simple scale, but what else can you do?
There are a lot of online games that are controlled with a keyboard.
What we like most is doodle.
This uses the left and right arrow keys to control the movement of the character and uses spaces to fight the bad guys.
So let's control it with the touchpad!
In hid-keyboard.
Ino, uncomment 35 lines to use an alternative key map.
This is achieved by removing the/at the beginning of the line.
Also, you should comment out 34 lines (
Add/at the beginning of the row //)
-This will result in this code (Default map)
Gray is not active.
If you upload the modified code to the TouchPad now, the first 5 electrodes (E0 to E4)
Will control the character-take a closer look at 35 lines and see which one did what.
Now go to the website linked below and you should be able to control the game with your TouchPad.
Once it's working fine, you can start designing your own custom game handle or controller using electric paint and cardboard-or something more fancy!
Please visit www if you like this tutorial. bareconductive. com for more!
Custom message
Chat Online
Chat Online
Leave Your Message inputting...
Hi, Nice to meet you! I am temporarilly away a momnet, Please can you talk with me by Whatsapp: +86 13582949978 / Skype: eliahe123? Email: info@itatouch.com Thank you in advance! Sincerely, ITATOUCH Sales {{"url":"/about us","text":"Welcome to visit us!"}} Welcome! What can I do for you?
Sign in with: