Isadora to arduino
-
Hello,
Working with a friend and he has been helping me set up my arduino to talk to Isadora. There is a problem in arduino 1.0.5 as the BYTE keyword is no longer supported and I am wondering what would go in its place. In the following sketch, I am trying to activate a movie by pressing a button that is connected to digital pin 2\. I see the state change in the Arduino serial window, but when I change over to Isadora, after setting up serial communication, nothing changes.This is the arduino sketch before I institute the change from Serial.print(i+97,BYTE); //send the port number to the arduino suggested Serial.write(). I am unclear as to what should be contained within the parentheses following the Serial.write call. Any Suggestions? I currently have Serial.write(13); and I am getting clean serial output to the arduino serial window, but again, when I switch over to Isadora and take initiate serial I do not get any response. I have included the arduino sketch in the body and the izzy patchas an attachment.Thank you,Michael/*This should enable you to read all the arduino pins in Isadora.Edit the ones you don't need out of this script.*/int delval=100; //set this to adjust the polling valueint value;int anports=5; //no of analog ports to read - note 0 means you will read one port. To skip reading any ports comment out the lop belowint digports=13; //as above but with digital portsvoid setup(){Serial.begin(9600); //you can change the baud rate}void loop()//comment out this loop to avoid reading any analog ports{for (int i=0; i<=anports; i++) {value = 1000+analogRead(i); // add 1000 to the value of the pin to ensure 4 digits.Serial.print(i,DEC); //send the port numberSerial.print(value); //send the valueSerial.println(); //send the eom}//comment out this loop to avoid reading any digital portsfor (int i=0; i<=digports; i++) {value = digitalRead(i); // add 1000 to the value of the pin to ensure 4 digits.Serial.print(i+97,BYTE); //send the port numberSerial.print(value); //send the valueSerial.println(); //send the eom} -
Dear All,
Figured it out, just had to eliminate the BYTE and enter the remaning i+97 into the parentheses