Skip to content
A script to read curves from a Touche programmed Arduino. This will create a new Thread for reading incoming Arduino serial data. Useful for working with sensors in Unity and not have the serial port cause a slow down on the main thread. Also includes methods for storing and comparing curves.
C# Other
  1. C# 83.5%
  2. Other 16.5%
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Assets
ProjectSettings
ToucheSketch
.gitattributes
.gitignore
ArduinoSerialRead.unitypackage
README.md
orchid.gif
water.gif

README.md

ArduinoSerialThreading

Project that implements the Touche method based on the Disney labs project for detecting gestures with a single wire. This implentation is specifically for Unity, creating a threaded serial read for the incoming Arduino data and plotting graphs using particles, objects and lines.

The lines are stored for comparing to the current curve reading to stored curves. To store curves, click the button when you are touching, grabbing, etc.

gif gif

Also includes a method for getting the name of the current serial port in the player build, allowing users to interactively switch to the correct port. All settings are stored for future launches of the application.

The original Processing sketch for Touche seemed glitchy, and appeared to only compare the highest y value of each curve, rather than the curve as a whole. This improves upon that by comparing the entire stored curve to the current curve read from the Arduino, always defaulting to the lowest total cumulative distance between each point of the curves.

You can’t perform that action at this time.