Joystick newbie

Status
Not open for further replies.

Benangulo

Member
Hi I'm new to this but I was looking through the forum and saw a couple things but it was way over my head.

Well what I would like to do is use all the analog inputs on a teensy 3.0
And I want to put potentiometers on all 14
I would like it to go through the joysticks but I'm only able to use like 6 potentiometers.
How would I code the teensyduino to use them all through serial?

Just to give you a brief overview of what I'm doing.
The software I'm using allows me to use joysticks and assign the output
To whatever I need. But the device must be already a joystick.

I used the basic teensy/USB-joystick-basic code to start it out.

Thanks
 
I would like it to go through the joysticks but I'm only able to use like 6 potentiometers.

Yes, only 6 axes are currently supported. Someday more might be supported. Please subscribe to this thread if you're interested:

http://forum.pjrc.com/threads/23681-Many-axis-joystick

Please post any conversation about many-axis joystick features on that thread. I will see it there when I work on this feature, but I won't find your comments if you write them here.


How would I code the teensyduino to use them all through serial?

Well, there are many possible ways. For example:

Code:
void loop() {
  for (int i=0; i<14; i++) {
    Serial.print(analogRead(i));
    Serial.print(",");
  }
  Serial.println();
  delay(250);
}

Open the serial monitor window to see the results.
 
Thank you so much for the information. Is that code a complete code or would I add it to my code? And would windows 7 see that code and know its a joystick?
 
Status
Not open for further replies.
Back
Top