Introduction: 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

Step 1: Download the Library

Download the PmodJSTK library. You can find this at the bottom of the product page.

Step 2: Check Your Sketchbook Location

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

Step 3: Install the Libraries

Open the sketchbook location in your file explorer.

Add a folder called libraries.

Extract the JSTK library in that folder.

Step 4: Open the Demo

Close and Reopen MPIDE.

Go to File -> Sketchbook -> Libraries -> JSTK -> JSTKDemo

The Demo will open.

Step 5: 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

Step 6: 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.

Step 7: Make Sure JP3 Is in the Correct Position

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

Step 8: Upload the Sketch

Now upload the sketch to your board.

Step 9: Open the Serial Monitor

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

Step 10: 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.