iona icon indicating copy to clipboard operation
iona copied to clipboard

Handling a steering wheel (analog input)

Open cyllboy opened this issue 4 years ago • 2 comments

Could you please point me to an example of how to handle an analog input (eg. steering wheel)? Is there any example I could look at to learn? Thank you very much!

cyllboy avatar Aug 23 '20 11:08 cyllboy

In this iona.ino configuration, iona reports 8 channels of analog inputs supports around the line 199. Once the host, e.g. naomi, recognize this report, it will start asking kCmdAnalogInput to retrieve the analog input status. The command is handled around the line 233 in the iona.ino.

Currently, it simply returns [0x80, 0x00] for each analog input channel, and this represents the center position in unsigned 16-bits integer.

If you have additional code to get analog inputs from e.g. USB gamepad, you can pass the value from your managed controller here. You may need to investigate which channel of analog inputs used for the function you are interested in.

toyoshim avatar Aug 25 '20 08:08 toyoshim

Great! Thanks a lot for the explanation!

Il giorno mar 25 ago 2020 alle ore 10:49 Takashi Toyoshima < [email protected]> ha scritto:

In this iona.ino configuration, iona reports 8 channels of analog inputs supports around the line 199. Once the host, e.g. naomi, recognize this report, it will start asking kCmdAnalogInput to retrieve the analog input status. The command is handled around the line 233 in the iona.ino.

Currently, it simply returns [0x80, 0x00] for each analog input channel, and this represents the center position in unsigned 16-bits integer.

If you have additional code to get analog inputs from e.g. USB gamepad, you can pass the value from your managed controller here. You may need to investigate which channel of analog inputs used for the function you are interested in.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/toyoshim/iona/issues/9#issuecomment-679894085, or unsubscribe https://github.com/notifications/unsubscribe-auth/APEPPLVVB6LMSRXJGE5TANTSCN3KVANCNFSM4QITR6KA .

cyllboy avatar Aug 25 '20 09:08 cyllboy