Ks0147 keyestudio Touch Key USB shield: Difference between revisions

From Keyestudio Wiki
Jump to navigation Jump to search
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[image:ks0147.png|thumb|400px|right|Keyestudio Touch Key USB shield]]
[[image:ks0147.png|thumb|400px|right|Keyestudio Touch Key USB shield]]
 
<br>
==Introduction==
==Introduction==
Have you seen the Makey touch keyboard simulation? MaKey MaKey is a very simple circuit board that can make any objects as a computing input device.<br>
Have you seen the Makey touch keyboard simulation? MaKey MaKey is a very simple circuit board that can make any objects as a computing input device.<br>
Line 26: Line 26:


<br>
<br>
==PINOUT==
==PINOUT==
<br>[[File:KS0147 pinout.jpg|800px|frameless|thumb]]<br>
<br>[[File:KS0147 pinout.jpg|800px|frameless|thumb]]<br>


<br>
<br>
==Test Code==
==Test Code==
Below is an example code.<br>
Below is an example code.<br>
Line 106: Line 104:
}
}
</pre>
</pre>
<br>
<span style="color: red">'''Code to Note:'''</span>  <br>
<span style="color: red">'''Code to Note:'''</span>  <br>
'''1.''' Before compile the code, do remember to add the necessary libraries inside the libraries directory of Arduino IDE.<br>
'''1.''' Before compile the code, do remember to add the necessary libraries inside the libraries directory of Arduino IDE.<br>
Line 111: Line 110:
https://drive.google.com/open?id=1WfwYEaAQSRz_q6QHv8qjIF8BfGwH0UNa<br>
https://drive.google.com/open?id=1WfwYEaAQSRz_q6QHv8qjIF8BfGwH0UNa<br>
'''2.''' In the code '''UsbKeyboard.sendKeyStroke(9)''', here you can change the value to make 6 buttons output different value. The detailed value you can find in the '''UsbKeyboard.h''' file, as the figure shown below.
'''2.''' In the code '''UsbKeyboard.sendKeyStroke(9)''', here you can change the value to make 6 buttons output different value. The detailed value you can find in the '''UsbKeyboard.h''' file, as the figure shown below.
<br>[[File:KS0147 Code.png|600px|frameless|thumb]]<br>
<br>[[File:KS0147 Code.png|700px|frameless|thumb]]<br>


<br>
<br>
Line 118: Line 117:
Upload well the code to UNO R3, then stack the shield onto UNO R3. Connect the alligator clip line to both GND and A0-A5 interfaces, and clip the coin to GND and A0 connected to alligator clip line.
Upload well the code to UNO R3, then stack the shield onto UNO R3. Connect the alligator clip line to both GND and A0-A5 interfaces, and clip the coin to GND and A0 connected to alligator clip line.
<br>[[File:KS0147 Result.png|700px|frameless|thumb]]<br>
<br>[[File:KS0147 Result.png|700px|frameless|thumb]]<br>
 
<br>
Then connect the shield to computer (WIN7) using a USB cable, the computer will automatically identify the shield. <br>
Then connect the shield to computer (WIN7) using a USB cable, the computer will automatically identify the shield. <br>
Open a Notepad, when your fingers touch the two coins, the letter A will continue to display on the text.<br>
Open a Notepad, when your fingers touch the two coins, the letter A will continue to display on the text.<br>
<br>[[File:KS0147 Result 1.png|500px|frameless|thumb]]<br>
<br>[[File:KS0147 Result 1.png|500px|frameless|thumb]]<br>
<br>
If use your fingers to separately touch the coin connected to GND and one end of A1-A5 alligator clip line, the letter BCDEF will display on the text.
If use your fingers to separately touch the coin connected to GND and one end of A1-A5 alligator clip line, the letter BCDEF will display on the text.
<br>
<br>
<br>
==Resources ==


==Resources ==
'''Download the code and libraries:'''<br>


'''PDF'''<br>
https://fs.keyestudio.com/KS0147
https://drive.google.com/open?id=1cEb74aJqLAVL-AOiIjHQQWLm2M5qyOmt


'''Video:'''<br>
'''Video:'''<br>
http://www.keyestudio.com/wp/ks0188/
 
http://video.keyestudio.com/ks0147/


<br>
<br>
==Get One Now ==
==Get One Now ==
'''Official Website'''
*[https://www.keyestudio.com/free-shipping-new-keyestudio-touch-key-usb-shield-for-arduino-p0337.html   '''Official Website''' ]
http://www.keyestudio.com/ks0147.html


'''Amazon Store'''<br>
*[https://www.aliexpress.com/store/product/Free-shipping-New-Makey-Makey-touch-key-USB-shield-analog-touch-keyboard-for-arduino/1452162_2043499238.html?spm=2114.12010612.8148356.64.31c5276frwiMC3  '''Shop on Aliexpress''']
https://www.amazon.com/NEW-Keyestudio-Touch-shield-Arduino/dp/B01E0TTXSQ/






[[Category: Shield]]
[[Category: Shield]]

Latest revision as of 15:08, 6 January 2021

Keyestudio Touch Key USB shield


Introduction

Have you seen the Makey touch keyboard simulation? MaKey MaKey is a very simple circuit board that can make any objects as a computing input device.
That’s to say, it can make stairway into a piano, bananas into a keyboard, plasticine into a joystick or even your families into a musical synthesizer.
The principle is simple. It uses ARDUINO microcontroller to simulate a keyboard, and lead out several keys, replacing the switch with touch key.
This Touch Key USB Shield is developed by KEYESTUDIO.
The shield uses touch input, namely, a double-contact switch, leading out touch port and ground connected to two touch electrodes. Because of body-resistance, when you touch the two electrodes, there is certain current flowing through between them, so can detect the touch event through the current detection.
More reference see the keyestudio Maker Touch Starter Kit.


Features

  • Compatible with UNO R3 and MEGA 2560 control board.
  • XP and win7 system Drive-free auto-identification
  • Identify six buttons at most
  • Operating voltage: DC 5V
  • Can set the 6 buttons output in the code
  • Onboard comes with 2 anti-reversed interfaces, used to connect other devices.


thumb


Technical Details

  • Dimensions: 70mm x 53mm x 26mm
  • Weight: 19.8g


thumb


PINOUT


thumb


Test Code

Below is an example code.
Click here to download the libraries.
Click here to download the code
Or you can directly copy and paste the code below to Arduino IDE.

#include "UsbKeyboard.h"
int InData1 = 0, InData2 = 0, InData3 = 0, InData4 = 0, InData5 = 0, InData0 = 0; //touch input value
//temporary storage
int TouchSensitivity = 20; //touch sensitivity. 0~1023,the larger the value, the lower the sensitivity.
void setup()
{
for(int i = A0; i <= A5; i++)
{
pinMode(i, INPUT); //A0~A5 port as input port
}
for(int i = 6; i <= 12; i++)
{
pinMode(i, OUTPUT); //A0~A5 port as input port
}
TIMSK0 &= !(1 << TOIE0);
}
void loop()
{
UsbKeyboard.update();
//read out the voltage value of all pins, and because of pull-up resistor,
//the default of all pins of maximum level is 1023,decrease the level of pins though touch.
//so the value is by 1024-analogRead(A0);
InData0 = 1024 - analogRead(A0);
InData1 = 1024 - analogRead(A1);
InData2 = 1024 - analogRead(A2);
InData3 = 1024 - analogRead(A3);
InData4 = 1024 - analogRead(A4);
InData5 = 1024 - analogRead(A5);
//trigger keyboard events with various possibility
if(InData0 >= TouchSensitivity)
{
digitalWrite (11, HIGH);
UsbKeyboard.sendKeyStroke(4); //A
}
else digitalWrite(11, LOW);
if(InData1 >= TouchSensitivity)
{
digitalWrite(10, HIGH);
UsbKeyboard.sendKeyStroke(5); //B
}
else digitalWrite(10, LOW);
if(InData2 >= TouchSensitivity)
{
digitalWrite(9, HIGH);
UsbKeyboard.sendKeyStroke(6); //C
}
else digitalWrite(9, LOW);
if(InData3 >= TouchSensitivity)
{
digitalWrite(8, HIGH);
UsbKeyboard.sendKeyStroke(7); //D
}
else digitalWrite(8, LOW);
if(InData4 >= TouchSensitivity)
{
digitalWrite(7, HIGH);
UsbKeyboard.sendKeyStroke(8);//E
}
else digitalWrite(7, LOW);
if(InData5 >= TouchSensitivity)
{
digitalWrite(6, HIGH);
UsbKeyboard.sendKeyStroke(9);//F
}
else digitalWrite(6, LOW);
delay(100);
}


Code to Note:
1. Before compile the code, do remember to add the necessary libraries inside the libraries directory of Arduino IDE.
Download the libraries from below link:
https://drive.google.com/open?id=1WfwYEaAQSRz_q6QHv8qjIF8BfGwH0UNa
2. In the code UsbKeyboard.sendKeyStroke(9), here you can change the value to make 6 buttons output different value. The detailed value you can find in the UsbKeyboard.h file, as the figure shown below.
thumb


Example Use

Upload well the code to UNO R3, then stack the shield onto UNO R3. Connect the alligator clip line to both GND and A0-A5 interfaces, and clip the coin to GND and A0 connected to alligator clip line.
thumb

Then connect the shield to computer (WIN7) using a USB cable, the computer will automatically identify the shield.
Open a Notepad, when your fingers touch the two coins, the letter A will continue to display on the text.

thumb

If use your fingers to separately touch the coin connected to GND and one end of A1-A5 alligator clip line, the letter BCDEF will display on the text.

Resources

Download the code and libraries:

https://fs.keyestudio.com/KS0147

Video:

http://video.keyestudio.com/ks0147/


Get One Now