DSTouch
A DS Touch Screen component plugin for Johnny-Five.
- SparkFun Nintendo DS Screen Kit
- Adafruit Touch Screen (Nintendo DSL digitizer) + Touch screen breakout board
API & Documentation
DSTouch
The DSTouch
class constructs objects that represent a single Nintendo DS Touch screen component.
var touch = ; touch;
Parameters
Property | Type | Value(s)/Description | Default | Required |
---|---|---|---|---|
address | number | Address for I2C device * | 0x04 |
no |
// Example of explicitly specified addressvar touch = address: 0x04;
* The address used by this "backpack" component is 0x04
. This can be changed by modifying the value in the firmware.
Properties
Property | Type | Value(s)/Description |
---|---|---|
x | number | The x coordinate of the present touch point. Will read 1023 if there is no touch point. |
y | number | The y coordinate of the present touch point. Will read 1023 if there is no touch point. |
Events
-
change Fired whenever the
[x, y]
coordinates of the pointer has changed. -
data Fired as frequently as the hardware can be read.
-
down / pointerdown The pointer makes physical contact with the surface, but was previously not touching the surface (similar to the browser mousedown or pointerdown event).
-
move / pointermove The pointer is touching the surface and has changed coordinates since the last position was read (similar to the browser mousemove or pointermove event).
-
up / pointerup The pointer no longer has physical contact with surface, but was previously touching the surface (similar to the browser mouseup or pointerup event).
NOTE: The word pointer means either capacitive or resistive stylus, or finger.
Backpack Controller
Install Firmware
Using the Arduino IDE, install the firmware to your AVR based microcontroller of choice.
Assembly
Connect To I2C Capable Platform
Arduino UNO
var five = ;var DSTouch = five;var board = ; board;
Tessel 2
var five = ;var DSTouch = five;var Tessel = ;var board = io: ; board;
Intel Edison MiniBoard
Intel Edison Arduino Board
var five = ;var DSTouch = five;var Edison = ;var board = io: ; board;
Ploma App
This repo comes with a version of @evhan55's example Ploma app that has been modified to accept input from a socket instead of a Wacom tablet.
To Run:
node eg/server.js
NOTE
The examples shown here are provided for illustration and do no specifically indicate platform support. This component class is expected to work with any platform that has I2C support.