Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Isadora: User Patches, Tips & Tricks:
arduino basic serial comm (el-wire control)

 

 


fubbi
Novice


Jun 23, 2008, 1:02 PM

Post #1 of 1 (2152 views)
Shortcut
arduino basic serial comm (el-wire control) Can't Post

we wanted to send on/off pulses to an el-wire (electroluminescent wire). this code did it for us in arduino:


Code
int ctrlPin = 11;  
int val = 0;
int value;
int value_a = 0;


void setup()
{
Serial.begin(19200);
pinMode(ctrlPin, OUTPUT);
}

void loop()
{
if (Serial.available() > 0) {
value_a = Serial.read();
if(value_a == 1){
digitalWrite(ctrlPin, HIGH);
}
else {
digitalWrite(ctrlPin, LOW);
}
}
}


and then a "send serial" actor with "P1 00" and "P1 01" in isadora to send the on and off to the ctrlPin. isadora defaults on a slower serial speed so one must set it to 19200 or whatever one used in the arduino script.

The el-wire hangs off a mosfet as described in the excellent pdf by massimo: http://www.arduino.cc/en/Booklet/HomePage

fubbi

 
 
 


Search for (options) copyright © TroikaTronix 2007