How to Use the PmodJSTK With the WF32
by Commanderfranz in Circuits > Microcontrollers
1630 Views, 7 Favorites, 0 Comments
How to Use the PmodJSTK With the WF32

In my attempting to make a controller out of the PmodJSTK and a WF32, I had to get the PmodJSTK library up and running. I figured as long as I was figuring out how to use this library I figured I would write an Instructable on how to use this library.
You will need:
- MPIDE installed
- A computer with internet
- A PmodJSTK
- A Pmod Cable
- 6 breadboard wires
- A WF32
- A micro USB cable
Download the Library

Download the PmodJSTK library. You can find this at the bottom of the product page.
Check Your Sketchbook Location

Open MPIDE and go to File -> Preferences. Look at the sketchbook location and take note of it.
Install the Libraries



Open the sketchbook location in your file explorer.
Add a folder called libraries.
Extract the JSTK library in that folder.
Open the Demo


Close and Reopen MPIDE.
Go to File -> Sketchbook -> Libraries -> JSTK -> JSTKDemo
The Demo will open.
Select the Correct Board

In order for MPIDE to correctly program your board it must know which board you have.
Go to Tools -> Board -> chipKIT -> WF32
Wire Up the PmodJSTK to SPI


Wire up the PmodJSTK to the SPI ports as shown in the images. The fritzing image (first image) is included to show clearly which connections need to be made. In reality you will need a Pmod cable to connect.
Make Sure JP3 Is in the Correct Position

Next make sure Jumper 3 has SS connected, not PWM.
Upload the Sketch

Now upload the sketch to your board.
Open the Serial Monitor

In the top right you'll see the symbol to open the serial monitor. Click this icon.
View the Transmitted Values

In the serial monitor you can see the transmitted values from the PmodJSTK.
Now that you have the Demo up and running you can see how the functions in the JSTK library are used to get the values of the button and joystick.