About SunFounder Preface SunFounder is a technology company focused on Raspberry Pi and Arduino open source community development. Committed to the pr

Similar documents
ROBOTLINKING THE POWER SUPPLY LEARNING KIT TUTORIAL

Alessandra de Vitis. Arduino

Freeduino USB 1.0. Arduino Compatible Development Board Starter Guide. 1. Overview

keyestudio Keyestudio MEGA 2560 R3 Board

ARDUINO LEONARDO WITH HEADERS Code: A000057

Instruction Manual. Model RBA18

ARDUINO LEONARDO ETH Code: A000022

Arduino ADK Rev.3 Board A000069

Building your own special-purpose embedded system gadget.

ARDUINO MINI 05 Code: A000087

ARDUINO MEGA ADK REV3 Code: A000069

RedBoard Hookup Guide

Digital Pins and Constants

ARDUINO M0 PRO Code: A000111

Arduino Uno. Arduino Uno R3 Front. Arduino Uno R2 Front

ARDUINO MEGA 2560 REV3 Code: A000067

Adafruit Metro Mini. Created by lady ada. Last updated on :12:28 PM UTC

ARDUINO MICRO WITHOUT HEADERS Code: A000093

TA0139 USER MANUAL ARDUINO 2 WHEEL DRIVE WIRELESS BLUETOOTH ROBOT KIT

IME-100 Interdisciplinary Design and Manufacturing

AXE Stack 18. BASIC-Programmable Microcontroller Kit. An inexpensive introduction to microcontroller technology for all ability levels

Touch Board User Guide. Introduction

Storing Your Exercise Files

ARDUINO UNO REV3 SMD Code: A The board everybody gets started with, based on the ATmega328 (SMD).

1/Build a Mintronics: MintDuino

An open-source hardware+software project. For design files and additional documentation, please visit:

MegaPi Born to Motion Control

StenBOT Robot Kit. Stensat Group LLC, Copyright 2018

8051 Intermidiate Development Board. Product Manual. Contents. 1) Overview 2) Features 3) Using the board 4) Troubleshooting and getting help

ARDUINO UNO REV3 Code: A000066

Makey Makey is a circuit board that comes with alligator clip wires, connectors wires and a cable that connects the board to your computer via USB.

Note. The above image and many others are courtesy of - this is a wonderful resource for designing circuits.

AT42QT101X Capacitive Touch Breakout Hookup Guide

UF-3701 Power Board Construction Guide

USB Type A Female Breakout Hookup Guide

IDUINO for maker s life. User Manual. For IDUINO development Board.

Adafruit DS3231 Precision RTC Breakout

Educato. Assembly Instructions

Goal: We want to build an autonomous vehicle (robot)

HUB-ee BMD-S Arduino Proto Shield V1.1

Prototyping & Engineering Electronics Kits Basic Kit Guide

Images Scientific OWI Robotic Arm Interface Kit (PC serial) Article

RoastLogger Arduino/TC4 driver installation for Windows 9/10/13 By John Hannon (JackH) at Homeroasters.org

EVAL-ADG2128EB. Evaluation Board I 2 C CMOS, 8 12 Analog Switch Array with Dual/Single Supplies FEATURES DESCRIPTION

How to use the Zduino LEE Module with the Trainer Board

Building and using JasperMIDI

Beetle SKU:DFR0282. Contents. Introduction

HUB-ee BMD-S Arduino Proto Shield V1.0

QUASAR PROJECT KIT # ATMEL AVR PROGRAMMER

SCRATCH. Introduction to creative computing with Scratch 2.0

Pro Trinket Keyboard. Created by Mike Barela. Last updated on :45:13 AM EST

Module 003: Introduction to the Arduino/RedBoard

If I wanted to connect an LED and little light bulb and have them switch on and off with one switch, my schematic would look like the one below.

Proper Debugging of ATSAMD21 Processors

How to Use an Arduino

Lab 01 Arduino 程式設計實驗. Essential Arduino Programming and Digital Signal Process

User Manual Rev. 0. Freescale Semiconductor Inc. FRDMKL02ZUM

Make your own secret locking mechanism to keep unwanted guests out of your space!

AT42QT1010 Capacitive Touch Breakout Hookup Guide

OBSTACLE AVOIDANCE ROBOT

Cygnos360 V2 Installation Manual

Cygnos360 V2 Installation Manual

Adafruit VL53L0X Time of Flight Micro-LIDAR Distance Sensor Breakout

Instructions for designing the HelloWorld circuit board using Autodesk Eagle 8.6.0

THE COMPLETE ALL IN ONE ROBOT 360 NANO BOT

AVR Intermediate Development Board. Product Manual. Contents. 1) Overview 2) Features 3) Using the board 4) Troubleshooting and getting help

Lab 2.2 Ohm s Law and Introduction to Arduinos

Hardware Overview and Features

DS1307 Real Time Clock Breakout Board Kit

Building the RGBW LED Controller

8051 Basic Development Board. Product Manual. Contents. 1) Overview 2) Features 3) Using the board 4) Troubleshooting and getting help

DIY KIT 121. ATMEL 89Cx051 PROGRAMMER

The Sumovore Arduino SumoShield

Thank you for purchasing the RGB Multi-MCU base and driver board from SuperTech-IT and TheLEDCube.com

Arduino Micro Breadboard Laboratory Interface Processor (Micro BLIP) User Manual

USER MANUAL ARDUINO I/O EXPANSION SHIELD

AlaMode User Manual Revision

Layad Circuits Arduino Basic Kit B. Content Summary

RFX 328p dev/deployment board - Assembly instructions (long version, v1.3, Feb 12, 2015)

TA0297 WEMOS D1 R2 WIFI ARDUINO DEVELOPMENT BOARD ESP8266

Robotics Adventure Book Scouter manual STEM 1

Bill of Materials: Turn Off the Lights Reminder PART NO

Omega MP. Multi-Programming Shield for Atmel Microcontrollers. User Manual

Sanguino TSB. Introduction: Features:

Learning development AVR-USB-Arduino project works by

Stand-alone programming AVRs using CircuitPython

Breadboard Voltage. Convenient 5V Supply for Breadboard

TA0013 ARDUINO RFID UNO STARTER KIT

This is the Arduino Uno: This is the Arduino motor shield: Digital pins (0-13) Ground Rail

Grove Lightning Detector 0219-MOD1016G-01

Electronics Design - Eagle

Circuit Playground Express: Piano in the Key of Lime

CS12020 (Computer Graphics, Vision and Games) Worksheet 1

Introduction to Proteus

IDUINO for maker s life. User Manual. For IDUINO Mega2560 Board(ST1026)

Shack Clock kit. U3S Rev 2 PCB 1. Introduction

PN532 NFC RFID Module User Guide

ANTUMBRA KLIK MANUAL

ATTiny84/85 AVR adapter kit building and usage instructions

EE 354 August 1, 2017 Assembly of the AT89C51CC03 board

Transcription:

About r Preface r is a technology company focused on Raspberry Pi and Arduino open source community development. Committed to the promotion of open source culture, we strive to bring the fun of electronics making to people all around the world and enable everyone to be a maker. Our products include learning kits, development boards, robots, sensor modules and development tools. In addition to high quality products, r also offers video tutorials to help you build your own project. If you have interest in open source or making something cool, welcome to join us! Visit www.sunfounder.com for more! About FruitKey Kit The r 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 ;connectitto some play-doh,youwillgetagamepad,andsoon. The FruitKey is compatible with Arduino Uno, Leonardo, r Mars, and r Uno, thus with one of these boards, we can make the FruitKey work. Here we use the r Mars as an example, and other boards works the same way. Note: You can download the code under LEARN -> Get tutorials on our website www.sunfounder.com. Free Support If you have any TECHNICAL questions, add a topic under FORUM section on our website and we'll reply as soon as possible. For NON-TECH questions like order and shipment issues, please send an email to service@sunfounder.com. You're also welcomed to share your projects on FORUM.

Contents Components List... 1 What Is It?...2 FruitKey +? = (Keyboard)...4 How Does 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

Components List No. Name Qty. Component 1 r FruitKey 1 2 Type-C USB cable 1 3 Type-A M-to-M USB cable (for FruitKey) 4 Dual-head alligator clip cable 10 1 5 Male-to-Male DuPont wire 10 1

What Is It? You may have heard about the popular kit named,inwhichmanystuffsare used as touch keyboards. There are quite a lot of videos showing how interesting projects it can make including games, work, etc. In fact, the is a simple circuit board that makes almost everything an input device for the computer. Therefore, stairs can be used as piano keys, a banana as a keyboard, some play-doh to make a gamepad, even your family members to do a synthesizer. It makes our life colorful and full of joy! Now, what's amazing is that you can also make it with an Arduino board and r FruitKey! The r 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 ;connectitto some play-doh,youwillgetagamepad ; draw buttons on a paper with a pencil, then you turn this paper into a controller for the Pac-Man. The r FruitKey works with the r Mars, r Uno, also the official Arduino Uno and the Leonardo board. The r Mars is a self-designed microcontroller compatible with the Arduino Uno in functionality and performance. Note: Here we take the r Mars as an example, and other boards work the same way. 2

The r Mars adopts also the ATMEGA328P as the processor, the same Optiboot bootloader as Uno. And it has 14 digital I/O pins and 6 analog inputs and is featured with a 32KB program storage and 16MHz crystal oscillator and so on. Multiple features make it unique: beautiful red PCB, parallel yellow and red pins, and a beautiful red appearance. In technology, it uses FTDI232R for USB-to-serial and adopts Type-C, the only USB 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 at the board side for operational convenience. To save space, the ATmega328P Microcontroller is packaged in patch. Together with r Mars, the FruitKey can be a simulated keyboard which is almost "omnipotent". 3

FruitKey +? = (Keyboard) The FruitKey works on any conductive objects. You can also spray some water on the object s surface to make it work. Preferred objects: banana, lead pencil, ketchup, lemon, and other plant; coin, jelly, cat (or dog, etc.), or, human being. How Does It Work? As long as the object is conductive, the FruitKey can work with it. The principle is that a single-chip microcomputer simulates some keys on a keyboard, and circuits will be connected by a touch rather than a switch. The r 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 flow through the power to ground on the board. Thus the current value can be detected, then the touch. Let your imagination go wild and turn anything into a keyboard! 4

Connect the FruitKey to two objects by alligator clips, such as your fingers and a lemon. When you touch 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: 5

Connect the six touch points A0-A5 of the FruitKey to 5V of Mars with a 1M pull-up resistor between each. If there is no touch, A0-A5 are High level by default (that is, the default value of A0-A5 is 1023). Since each of the six points is connected 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. OncetheAD 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 for separately. A0-A5 6

Software Installation Note: Before starting your own project, you must download the file FruitKey V1.0 for Arduino.zip on our official website by visiting LEARN -> Get Tutorials -> FruitKey V1.0 for Arduino and unzip it. Arduino Description Arduino is an open source platform with simple software and hardware. You can pick it up in short time even if you are a beginner. It provides an integrated development environment (IDE) for code compiling, compatible with multiple control boards. 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. Onthepage,checkthesoftwarelist on the right side under Download the Arduino Software. Find the one that suits your operation system and click to download. There are two versions of Arduino for Windows: Installer or ZIP file. You're recommended to download the former. 7

Step 2: Double click the exe. file and the following window will show up. Click IAgree.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. 8

The following interface will show up. (Note: After 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. 9

Select Always trust software for "Arduino srl" and click Install. After the installation is done, click Close. Then an 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. 10

3. Find the UsbKeyboard library under the \FruitKey V1.0 for Arduino\Code\Library. Click Open. 4. When you see Library added to your libraries. Check Include library menu, itmeansyou have added the library successfully. Please use the same method to add other libraries then. 11

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 r 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 12

Step 2: Open FruitKey V1.0 for Arduino\Code\Test\Test.ino Step 3: Select a board. Here we select Arduino Uno. Then select a Port. Here is COM60 (yours should be different). Step 4: Upload the code to the board. When you see Done Uploading prompts, which indicates the upload is finished, you can start the test then! Step 5: Clip one end 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 one in a workable circuit you've completed. So, everything works just fine. Now let s try to use the FruitKey! 13

Simulated Keyboard The main function of the r FruitKey is to make a simulated keyboard. But before that, we need to do some preparation. 1) Open Handle.ino under the path of FruitKey V1.0 for Arduino\Code\Handle, thenupload 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 14

Note: Operating Systems including WIN7, XP, andmac O SX can recognize the board with the driver automatically. If it cannot be recognized by your computer, just remove the USB cable and replug to try. Now, everything is ready! Just fully utilize your imagination to turn 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 conductive objects. Let s try the following games now! 15

GAME-Pac Man GAME-Flappy Bird 16

Change Functions of Keys We use different types of key when we play different games or use varied software, so we need to replace the function in the FruitKey, which is very simple. The r FruitKey is designed as a control board based on Arduino to make a keyboard with rich 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, anda 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 under C:\Users\sunfounder\Documents\Arduino\libraries\UsbKeyboard 17

4) This usb_keymap.h is to define 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, andright, withkeyso, P, Q, andr, you just need to modify the corresponding key value. 18

Compile the code and upload it to the r 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 19

Adjust Touch Sensitivity We can make the test by using a banana as keyboard it will respond to a touch very fast. However, conductivity varies among different objects, which may affect the touch sensitivity. Open the handle.ino file, go to line 3 int TouchSensitivity = 30, in which TouchSensitivity represents the sensitivity of the FruitKey. The lower the value is, the more sensitive 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. Youcantrytomodifythedelayvalueinthecodetosolvetheproblem.Thebiggerthevalueis, the longer the responding time will be. Since different conductive stuffs vary in responding time, you can modify the value according to actual situation. After the adjustment is ok, we can play games then. 20

Tips When you 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 21

Copyright Notice All contents including but not limited to texts, images, and code in this manual are owned by the r Company. You should only use it for personal 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. 22