Using Conductive Paint to Triggers Videos

edited March 2016 in Arduino

I am very new to processing and currently doing a project using conductive paint and an arduino and i have the conductive paint working in Arduino using the capacitive sensor, so when its not being touched i see "0's" in the serial port but then when it is touched i get a reading of "59's" and "60's".

1.what i want to do is try get the capacitive sensor working in processing with the conductive paint 2.when the paint is touched i want is to trigger playing a video on a computer. I am new to arduino and processing so i am just wondering how to go about doing this ? thanks :)

Below is my code in arduino using the Capacitive Sensor sketch I have tried using this in processing with the import processing.serial.*; but i really am not sure how to do it. any help on how to do this in a basic level would be greatly appreciated:

include <CapacitiveSensor.h>

CapacitiveSensor cs_2_4 = CapacitiveSensor(2,4);
CapacitiveSensor cs_2_5 = CapacitiveSensor(2,5);

void setup()

{ Serial.begin(9600); }

void loop()

{ long total1 = cs_2_4.capacitiveSensor(30);
long total2 = cs_2_5.capacitiveSensor(30);
Serial.print("X");
Serial.print(",");
Serial.print(total1);
Serial.print(",");
Serial.println();
Serial.print("Y");
Serial.print(",");
Serial.print(total2);
Serial.print(",");
Serial.println();

delay(100);
} 

Answers

This discussion has been closed.