PulsePosition library question

Status
Not open for further replies.
I'm using the PulsePosition library to convert PPM signals to joystick signals and I found an example that has the line -

Joystick.x(map(joyin.read(1),1000,2000,0,1024))

I know that the (1) means channel #1, but what - exactly does the 1000,2000,0,1024 mean?

I'm pretty certain that the "0" means read the period of the LOW pulses, and that 1024 means that the output should be 10-bit, but does the 1000,2000 mean that
a pulse period of 1000uSec will return a "0" and a 2000 uSec pulse will return 1023, Or does it mean something else?

I am using 8 channels of ANALOG joystick, but I cannot seem to get more than 6 channels working. I am using NO buttons.
My joysticks are called
X
Y
Z
Zrotate
sliderLeft
sliderRight

I can't find any list of "suitable" names for analog sticks (ones that the IDE will accept). Where do I find the names for the other 2 channels that I need?
 
The default USB Joystick device in Teensyduino supports only 6 axes.

There is an extended joystick option, but it involves editing usb_desc.h to enable it.
 
Status
Not open for further replies.
Back
Top