We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I am creating and interactive installation for my final year project. I am using conductive paint which uses the capacitive sensor in arduino so when its touched i get a reading of over 50 in the serial port. I then have arduino communicating with processing so when i touch the paint the numbers of over 50 appear in the console. What i want to do is have different conductive paint buttons trigger different videos to play in resolume and the video would be projected onto walls. I have both the syphon and oscP5 sketch downloaded in processing but i am unsure which to use and how to go about using it.
Just wondering if anyone could help me or give me some guidance, i am new to this so a basic explaination would be greatly appreciated, thanks.
below is my code for arduino
#include <Boards.h>
#include <Firmata.h>
#include <CapacitiveSensor.h>
CapacitiveSensor cs_2_4 = CapacitiveSensor(2,4);
void setup()
{
Serial.begin(9600); }
void loop()
{ long start = millis();
long total5 = cs_2_4.capacitiveSensor(30);
Serial.print(millis() - start); // check on performance in milliseconds
Serial.print("\t"); // tab character for debug windown spacing
Serial.println(total5); // print sensor output 1
// print sensor output 3
delay(100); // arbitrary delay to limit data to serial port
}
below is my code for processing
import processing.serial.*;
Serial myPort; // Create object from Serial class
String val; // Data received from the serial port
void setup() { size(400,400); myPort = new Serial(this, "/dev/tty.usbmodem1421", 9600); }
void draw()
{ if ( myPort.available() > 0)
{ // If data is available,
val = myPort.readStringUntil('\n'); // read it and store it in val
}
println(val); //print it out in the console
}
Answers
https://forum.Processing.org/two/discussion/14988/drawing-of-graphs-from-i2c-imu