Jump to content
  • 0

Pmod JSTK2 library in C language for macOS


panvica

Question

Hi! I would like to ask if there is any library in C language for programming Pmod JSTK2 on macOS. If not, could you give me some advice, please? I am working on school project and I have to use C language and VS code for that. My task is simple, create a code for operating some menu/game or anything else using the 2-axis joystick. I am using the platform ESP32. 
Thanks in advance!
Michael.

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Hi @panvica,

Digilent does not have any direct 'standalone' C code to use the Pmod JSTK2.

There is an Arduino style library available on the Pmod JSTK2 Resource Center here (https://digilent.com/reference/pmod/pmodjstk2/start#example_projects) and some processor code written in C to be used with Xilinx FPGAs on our Github here (https://github.com/Digilent/vivado-library/tree/master/ip/Pmods/PmodJSTK2_v1_0/drivers/PmodJSTK2_v1_0).

Otherwise if you are able to communicate directly to the device over SPI, the command structure of the command byte followed by 4 parameters sent over MOSI (and the order of joystick and button state data simultaneously received over MISO) is explained in a bit more detail in the reference manual here (https://digilent.com/reference/pmod/pmodjstk2/reference-manual).

Let me know if you have any questions.

Thanks,
JColvin

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...