Joystick Input issues
in
Integration and Hardware
•
1 year ago
I'm new to the world of programming and having a crack at Joystick control using proControll. When i run the sketch below i'm constantly getting zeros output for some reason. If anyone could point me in the right direction i would be greatful.
import processing.serial.*;
import procontroll.*;
import java.io.*;
ControllIO controll;
ControllDevice joystick;
ControllSlider sliderX;
ControllSlider sliderY;
ControllButton button;
float xpos;
float ypos;
float multiplier = 1;
void setup(){
controll= ControllIO.getInstance(this);
joystick = controll.getDevice("Logitech Extreme 3D");
sliderX = joystick.getSlider("X Axis absolute");
sliderY = joystick.getSlider("Y Axis absolute");
}
void loop (){
sliderX.setMultiplier(multiplier);
sliderY.setMultiplier(multiplier);
xpos = sliderX.getValue();
ypos = sliderY.getValue();
println(xpos);
println(ypos);
}
Cheers
Richard
1