How to Use the PmodJSTK With the WF32

by Commanderfranz in Circuits > Microcontrollers

1603 Views, 7 Favorites, 0 Comments

How to Use the PmodJSTK With the WF32

8 - wire up.jpg

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

product page.JPG

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

Check Your Sketchbook Location

1 - sketchbook location.JPG

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

Install the Libraries

2 - create libraries.JPG
3 - extract in libraries.JPG
3.1 - extract in libraries.JPG

Open the sketchbook location in your file explorer.

Add a folder called libraries.

Extract the JSTK library in that folder.

Open the Demo

4 - open demo.jpg
5 - open demos.JPG

Close and Reopen MPIDE.

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

The Demo will open.

Select the Correct Board

6 - select board.jpg

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

7 - wire up.jpg
8 - wire up.jpg

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

9 - jumper.jpg

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

Upload the Sketch

10 - upload.JPG

Now upload the sketch to your board.

Open the Serial Monitor

11 - serial monitor.JPG

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

View the Transmitted Values

12 - view values.JPG

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.