Just a simple question regarding the procontroll library on processing. I am trying to connect a joystick to a simple game. it consist of a vehicle that goes up and down. The downward motion is represented by gravity. the upward motion I wanted it to be represented by throttle control. I have use procontroll to connect my joystick (black widow speedlink) to processing.what I noticed is that the slider (throttle control) motion has to be maximum or minimum for the object on processing to move.So speed doesn't change as I throttle up or down. Anyone up to help or advise me on any other api I can use to code for joystick throttle control.thanks
Asked
Active
Viewed 117 times
1 Answers
0
Did you configure a Minimum Time Intervall?
tmrPoll = new Timer(25);
tmrPoll.Elapsed += new ElapsedEventHandler(tmrPoll_Elapsed);
tmrPoll.Start();
and afterwards under the tmrPoll_elapsed:
jst.UpdateStatus();//jst= new joystick
ax[0] = jst.AxisC;
ax[1] = jst.AxisA;
ax[2] = jst.AxisB;
ax[3] = jst.AxisD;
ax[4] = jst.AxisE;
ax[5] = jst.AxisF;

ephraim
- 379
- 1
- 3
- 15