background image

12

What Can FruitKey Do?

With this kit,

*Designers can create amazing art works.
*Engineers can develop all kinds of interesting games.
*Educators can enlighten children’s creativity.
*Unlimited creative space can be available for geeks.

Test

Before using the FruitKey, let’s test its sensitivity first.

Principle

We have connected 6 LEDs to pin6-pin12 separately on the FruitKey, which lead to A0-A5. Clip
one end of the alligator clip cable to the hole pairs of the

GND

while leaving the other end

dangling, and another cable to one hole pairs of A0-A5 also with the other end dangling.
Touch the dangling end of the two cables, and the corresponding LED will brighten.

Procedures

Step 1:

Insert the FruitKey to the SunFounder Mars board, and connect the Mars to your

computer by a Type-C USB Cable. The green LED (power indicator) on the boards will brighten
at the same time. The computer will install the driver automatically, and the

Arduino

Uno(COMXX)

will prompt at the taskbar after a while.

Type-C USB cable

SunFounder

Summary of Contents for FruitKey

Page 1: ... Arduino You can realize the s functions with an Arduino board It can turn fruits stairs play doh animals tables leaves or even a pencil drawing into keyboard or gamepad Just connect it to some bananas you can get a banana piano connect it to some play doh you will get a gamepad and so on The FruitKey is compatible with Arduino Uno Leonardo SunFounder Mars and SunFounder Uno thus with one of these...

Page 2: ...oes It Work 4 Software Installation 7 Arduino 7 Description 7 Install Arduino IDE 7 Add the Library 10 What Can FruitKey Do 12 Test 12 Simulated Keyboard 14 Change Functions of Keys 17 Adjust Touch Sensitivity 20 Adjust Responding Times 20 Tips 21 S u n F o u n d e r ...

Page 3: ...ponents List No Name Qty Component 1 SunFounder FruitKey 1 2 Type C USB cable 1 3 Type A M to M USB cable for FruitKey 1 4 Dual head alligator clip cable 10 5 Male to Male DuPont wire 10 S u n F o u n d e r ...

Page 4: ...nFounder FruitKey is a USB keyboard simulating control board designed for Arduino You can realize the s functions with an Arduino board It can turn fruits stairs play doh animals tables leaves or even a pencil drawing into keyboard or gamepad Just connect it to some bananas you can get a banana piano connect it to some play doh you will get a gamepad draw buttons on a paper with a pencil then you ...

Page 5: ...port so far that supports reversible plug orientation All the I O ports are made with two pins male and female in a row for free to use you can just plug Dupont wires regardless of M or F A 5V power switch is added to control the board power which may be expected by mass hobbyists you can switch off the board when it s not in use so as to avoid frequent plugging In addition a reset button is set a...

Page 6: ...lates some keys on a keyboard and circuits will be connected by a touch rather than a switch The SunFounder FruitKey uses a touch as the input signal It adopts two point touching switch The alligator clip cables are connected to the touching end and ground on the board while connected to the anode and cathode on the other end When someone touches the anode and cathode as a resistor currents will f...

Page 7: ...ch the when holding the other clip an electric circuit is generated Then the FruitKey will send a signal key pressed to the computer via Mars which be considered as a real keyboard by the computer The FruitKey can run on any programs or webpages The schematic diagram of the FruitKey S u n F o u n d e r ...

Page 8: ...ected to a 0 1μF ceramic capacitor respectively when you touch the GND and one or two of A0 A5 the corresponding capacitor will discharge and the input voltage will be reduced thus the input AD value Once the AD value decreases to the threshold it can be considered that the corresponding touching pad has been triggered Besides we can connect six LEDs to digital pin6 pin11 as the signal indicators ...

Page 9: ...s So you can just download the Arduino IDE upload the sketches i e the code files to the board and then you can see relative experimental phenomena For more information refer to http www arduino cc Install Arduino IDE The code in this kit is written based on Arduino so you need to install the IDE first Skip it if you have done this Step 1 go to the arduino cc website and click Download On the page...

Page 10: ...file and the following window will show up Click I Agree The following interface will show up Choose Next Click Browse to choose the installation path or enter a directory at the Destination Folder Click Install S u n F o u n d e r ...

Page 11: ...ter the installing progress bar goes to the end the Close button may be enabled for some PC Just click it to complete the installation Then a prompt appears Select Always trust software for Adafruit Industries and click Install S u n F o u n d e r ...

Page 12: ... Arduino icon will appear on the desktop Add the Library 1 Libraries are a collection of code that makes it easy for you to connect to a sensor display module etc In this kit you will need to add one library to the Arduino libraries folder UsbKeyboard zip 2 Select Sketch Import Library Add Library S u n F o u n d e r ...

Page 13: ...ruitKey V1 0 for Arduino Code Library Click Open 4 When you see Library added to your libraries Check Include library menu it means you have added the library successfully Please use the same method to add other libraries then S u n F o u n d e r ...

Page 14: ...the alligator clip cable to the hole pairs of the GND while leaving the other end dangling and another cable to one hole pairs of A0 A5 also with the other end dangling Touch the dangling end of the two cables and the corresponding LED will brighten Procedures Step 1 Insert the FruitKey to the SunFounder Mars board and connect the Mars to your computer by a Type C USB Cable The green LED power ind...

Page 15: ... of an alligator clip cable to the GND hole pairs and leave the other end dangling then snap another cable into A0 hole pairs and the other end dangling Touch the two dangling ends and you will find the LED 1 brighten and become dim as soon as you let them go To test the sensitivity of all the hole pairs of A0 A5 one by one you can repeat the above operations as for the rest five cables try one by...

Page 16: ...reparation 1 Open Handle ino under the path of FruitKey V1 0 for Arduino Code Handle then upload the code to the board 2 Remove the Type C USB cable and connect the FruitKey to the computer with a USB type A M to M cable As the driver will be installed automatically it may take a little time USB type A M to M cable S u n F o u n d e r ...

Page 17: ...n anything into a keyboard Nothing is impossible Clip one end of the six alligator clip cables onto the holes and the other end to any desired conductive stuffs as you wish The default functions of A0 A5 in Handle ino are shown as below A0 A1 A2 A3 A4 A5 Left Up Down Right Space Enter Open a game or software try these six keys Up Down Left Right Space and Enter by touching the corresponding conduc...

Page 18: ...16 GAME Pac Man GAME Flappy Bird S u n F o u n d e r ...

Page 19: ...ich key functions Therefore we can change the function of the keys via checking the libraries 1 Find the folder in which you saved UsbKeyboard previously Select File Preferences and a window will pop up on which you can see the location of the folder Please note that the path may differ from what s shown in this case 2 Then go to this path and you can see a libraries folder 3 Open usb_keymap h und...

Page 20: ...fine some keys such as space and Enter Open the handle ino file find the lines for key control 5 To change the keys Up Down Left and Right with keys O P Q and R you just need to modify the corresponding key value S u n F o u n d e r ...

Page 21: ...t to the SunFounder Mars Remove the Type C USB cable connect the FruitKey to your computer with a male to male USB A cable and then you can type in those letters by touching corresponding objects GAME Banana Piano S u n F o u n d e r ...

Page 22: ...ve it will be Adjust Responding Times You may have found out in the previous experiment that once you touch that conductive object it will respond for more than one time For example when you touch O once several As will appear which can cause a trouble sometimes You can try to modify the delay value in the code to solve the problem The bigger the value is the longer the responding time will be Sin...

Page 23: ...ou are playing the FruitKey it may happen that your device cannot be recognized because of USB loose connection please don t worry and follow two steps 1 Replug the USB cable 2 Re upload the code S u n F o u n d e r ...

Page 24: ...al study investigation enjoyment or other non commercial or nonprofit purposes under the related regulations and copyrights laws without infringing the legal rights of the author and relevant right holders For any individual or organization that uses these for commercial profit without permission the Company reserves the right to take legal action S u n F o u n d e r ...

Reviews: