Back to Getting Started

Back to Examples

Magnetometer Wireless Joystick Example

Using KoliadaES, PIEP, and Infineon, create a wireless joystick.

There is a video Tutorial that shows how everything is put together, as well as a live demo. Watch it Here

In this example, a conventional joystick is not used. Instead, a magnetometer, which can be used in multiple different applications other than a joystick, is used. Infineon has a board, the TLE493D-A2B6, which contains the magnetometer to be used. They also provide multiple different 3D printed user interfaces that can be applied onto the board, such as a joystick or a slider.

The 3D printed joystick contains a magnet embedded at the bottom of the sphere, and the magnetometer picks up on the magnetic fields and interprets it depending on the joystick's position.

PIEP Boards:

PIEP Accessories:

Infineon Parts:

Before you proceed with this tutorial, you must have the latest KoliadaESDK(TM) and KoliadaES environment setup. For more information on the setup check out Koliada Getting started. This example will run on any processor board that has UART serial communication and whereas this tutorial uses the PIEP CC2541, you can use any compatible processor board.

Fig. 1: USB and TI CC2541 Stack

Before working on this example, make sure you have set the latest KoliadaESDK(TM). For information on KoliadaESDK(TM) setup see here.

Note: After making sure the KoliadaESDK(TM) is setup correctly, the BuildConfig needs to be built & flashed only if you have changed any board configuration. You can find an example BoardConfig project here: KoliadaESDK(TM)/examples/BoardConfig.

In this particular example there are no I/O configuration changes, and we can move on to build and flash the TestBios application.

The next step is optional - saw-off the segment of the magnetometer that will not be used. This is to reduce the profile of the joystick since the rest is not used.

Refer to the image shown below to know where to cut:

Be sure there is enough space so you can still use the screw hole for mounting it to the joystick.

Next we will be soldering the 1mm Leads to the Magnetometer portion we cut off. This contains the SCL, SCA, LED1, LED2, Power, and Ground pins.

Refer to the wiring diagram shown below:

Now that the Magnetometer is soldered with the leads, connect them to the 10 position connector. Be sure to confirm which side starts with pin 1 by testing to see how it fits when plugged into the terminal board.

Use the screw to fasten the the magnetometer piece to the under-side of the joystick. Be wary of over-tightening it, as it may damage the joystick.

Flashing the two processor boards requires to obtain the software. Head to our Projects page to obtain the software.

We can now assemble the transmitter and receiver stacks. The receiver stack starts with the Battery Board on bottom, then the Processor Board, and finally the Terminal Board on top. Make sure to use the hex-screws to prevent the SPIP pins from bending.

To get things running, plug the receiver stack to your computer via USB and turn on Battery Board on the transmitter stack.

To execute the program, be sure to start the Chart Recording App and then the Producer App. This allows the receiver to first get recognized before starting up a local server. Windows Firewall may also ask to allow the connections for the Producer App, make sure to allow it.

      Copyright © 2018-2019 Koliada, LLC
  • piep/examples/magnetometerjoystick.txt
  • Last modified: 2019/06/27 16:37
  • by jonathan