Serial IO patch

V3-architech's picture

Hello Everyone,

actually i work on a project with servo controlled by an arduino and quartz composer. For a first test i find how send the analog input data of the arduino to quartz composer using the serial patch input. Now i want to know if it's possible to receive the digital output in quartz composer instead of the analog input and also is it possible to send some analog data to arduino with quartz composer?

Thank you

leon's picture
Re: Serial IO patch

I think the info received depends of your arduino sketch. If you say "serial print" and use the digital output, it will have that. Quartz will receive what you read on the serial monitor.

/* hautkai, based on Ard to QTZ by M. Niinimäki, */

const int buttonPin = 2; // the number of the pushbutton pin

void setup(){ pinMode(buttonPin, INPUT); Serial.begin(9600); //Set the Baud Rate }

void loop (){ // Read the digital values buttonState = digitalRead(buttonPin); // Print a packet of the values to the serial port Serial.println(buttonState); delay(2); \for stability }

The same way back, I guess. Look at the arduino side for reading serial input, it will take what you send. don't confuse the two areas, kind analog or and digital depends of what you program, serial port is just the communication of strings or values, not their quality.

best (and late) greetings