View unanswered posts | View active topics It is currently Tue Nov 25, 2014 4:54 pm






Reply to topic  [ 1 post ] 
Has to be WIRELESS PS2 controller? 
Author Message
Rookie

Joined: Fri Oct 09, 2009 2:55 pm
Posts: 1
Post Has to be WIRELESS PS2 controller?
So I have the MindSensor PS2 controller port. I've been trying to get the example programs to work, but I don't seem to get any results.

One thing that might be the issue is that I don't have a wireless controller, I have a regular controller with a wire. Would this break the existing polling behaviour of JoystickDriver.c? Or is it something else?

Code:
#include "JoystickDriver.c"
TJoystick joystick;

task main()
{
  while(true)
  {
   getJoystickSettings(joystick);

   nxtDisplayTextLine(4, "Control is %d", joystick.joy1_y1);
   if(joy2Btn(1) != 0) {
      nxtDisplayTextLine(5, "Push");
   } else {
      nxtDisplayTextLine(5, "Not");
   }
  }
}


This always displays "Control is 0," no matter what I do with the joysticks, and "Not" no matter what buttons I press.


Fri Oct 09, 2009 3:50 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.