I want to use the Flysky FS-I6 for FPV of a drone simulator through a radio receiver and arduino. But I can't figure out which channel needs to be mapped to where? channel 3 (i.e. the throttle) is it the z axis or the throttle after all? and other channels are also not clear to me which channel is responsible for the x,y,z axis. and how to map additional channels (5-8, switches) as buttons or as "HatSwitch"
switch(ch) {
case 2:
Joystick.setXAxis(value*255 - 127);
break;
case 3:
Joystick.setThrottle(value*255);
break;
case 1:
Joystick.setYAxis(value*255 - 127);
break;
case 4:
Joystick.setHatSwitchRyAxis(value*360);
break;
case 5:
// Joystick.setHatSwitch(value*255 - 127);
break;
case 6:
// Joystick.setRudder(value*255);
break;
case 7:
break;
case 8:
break;
}
please explain what exactly it says? I've seen it all before, but it didn't make it any clearer to me. and my questions are still relevant, channel 1(2,3,4) is which axis? is the throttle channel a throttle or some kind of axle?
this are axes. you know what your FlySky contain and how it is programmed. for example you has throttle on left stick and up/down left/right on the right stick + 1 button. PPM channels(still for example) 1/2 - xAxis/yAxis:
case 1:
Joystick.setXAxis(value*255);
break;
case 2:
Joystick.setYAxis(value*255);
break;
channel 3 trottle:
case 3:
Joystick.setThrottle(value*255);
break;
channel 4 button:
case 4:
Joystick.setButton(0,value>0.5?1:0);
break;
and than on PC it should be so:
actually i don't know how you config Joystick object, so property window on PC may vary.