Go Down

Topic: Project 14 Processing (Read 5527 times) previous topic - next topic

uaefame

THis project is basically changing the background color based on POT value.

I RUN The code in processing 2.2.1 (latest version) nothing is happening .

HeRE is the processing code
Code: [Select]
import processing.serial.*;
Serial myPort;

PImage logo;
int bgcolor = 0;

void setup(){
colorMode(HSB, 255);

logo=loadImage("http://arduino.cc/logo.png");
size(logo.width, logo.height);
println("Available serial ports:");
println(Serial.list());
//myPort = new Serial(this, Serial.list()[0], 9600);
myPort = new Serial(this, "COM3", 9600);
}

void draw(){
if(myPort.available() > 0){
bgcolor = myPort.read();
println(bgcolor);
}
background(bgcolor, 255, 255);
image(logo, 0,0);
}

uaefame

Anyone have problem or faced problem with project 14?

Is there anything wrong in my processing code? or all seem fine.

The background color takes forever to change for me not sure why.

I am having problem to change the background color instantly it change by after long period of time.

AlexSk

I'm running Ubuntu 14.04.
After installing Processing, the program works, but the backgroung did not change simultaneously.
When I move the potentiometer, background stays the same.
To change the Backgroung I have to stop the script in Processing, and run again.
Now it shows the new background.

Under Windows8 x64 it was working fine.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy