Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
richard1968
richard1968's Profile
1
Posts
0
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
Joystick Input issues
[0 Replies]
27-Aug-2012 01:14 PM
Forum:
Integration and Hardware
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
«Prev
Next »
Moderate user : richard1968
Forum