So this looked very good as well. The structure in the device file isn't very difficult to reverse engineer so I thought I should be able to read this file in Codesys.
Then i tried to read this file in Codesys
Variable declaration:
"同问" seems to translate to "The same question", but please use english when posting s.th. here. Without using a common language there will be no "Talk" 😉
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi All,
I'd like to connect a USB game-pad and use it to control things in my application.
What I've done so far:
1. Installed: ```
sudo apt-get install joystick
Driver version is 2.1.0.
Joystick (Gasia Co.,Ltd PS(R) Gamepad) has 7 axes (X, Y, Z, Rz, Hat0X, Hat0Y, (null))
and 12 buttons (Trigger, ThumbBtn, ThumbBtn2, TopBtn, TopBtn2, PinkieBtn, BaseBtn, BaseBtn2, BaseBtn3, BaseBtn4, BaseBtn5, BaseBtn6).
Testing ... (interrupt to exit)
Axes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 6:-32767 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7:off 8:off 9:off 10:off 11:off
Response, Note the first seven digits are the address then the actual 16 Bytes of data follow.
So this looked very good as well. The structure in the device file isn't very difficult to reverse engineer so I thought I should be able to read this file in Codesys.
Variable declaration:
Code:
However I get in the variable Buffer only some counter which is constantly counting up.
Has anyone any idea how I can read this file?
Thank you!
Regards,
Chris
同问
Hi yangkkokk!
Welcome to CODESYS Talk!
"同问" seems to translate to "The same question", but please use english when posting s.th. here. Without using a common language there will be no "Talk" 😉