This project demonstrates how to interface a SparkFun I²C Joystick with an NXP microcontroller using an I²C-based GPIO expander (PCA9554). The application initializes the hardware, configures the joystick inputs via the expander, and continuously reads the state of each joystick direction.
This example is useful as a reference for handling digital inputs over I²C using SparkFun peripherals on NXP platforms with CMSIS drivers.
- FRDM-MCXA153
- FRDM-MCXA156
- FRDM-MCXA174
- FRDM-MCXA266
- FRDM-MCXA344
- FRDM-MCXA346
- FRDM-MCXA366
- FRDM-MCXC242
- FRDM-MCXC444
- FRDM-MCXN236
- FRDM-MCXN947
- FRDM-MCXW72
- FRDM-RW612
-
USB Type C cable
-
I²C SparkFun Qwiic connector
- Open MCUXpresso for VSCode extension.
- In Quick Start Panel window click in Application Code Hub.
- In Search text field, type the name of this example "Qwiic Joystick on FRDM MCU's".
- Select the example, update the name and select the directory where the example will be saved.
- Click Import Project and wait some minutes.
- If window appears in top side of VSCode select projects that will be imported and wait.
- Now, the projects of demo should be in projects panel.
- Connect FRDM board to computer with USB-C cable in MCU-Link port of FRDM.
- Open MCUXpresso extension in VSCode.
- Select the project "dm-qwiic-joystick-frdm-(mcu)".
- Do right click on project and select pristine build and wait about a one minute.
- Click run (play icon).
- Please wait a few seconds.
- Now click stop in center upper button.
- 115200 bps
- 8 bits
- 1 stop bit
- No parity
- No flow control

Questions regarding the content/correctness of this example can be entered as Issues within this GitHub repository.
Warning: For more general technical questions regarding NXP Microcontrollers and the difference in expected functionality, enter your questions on the NXP Community Forum
| Version | Description / Update | Date |
|---|---|---|
| 1.0 | Initial release on Application Code Hub | May 19th 2026 |
Trademarks and Service Marks: There are a number of proprietary logos, service marks, trademarks, slogans and product designations ("Marks") found on this Site. By making the Marks available on this Site, NXP is not granting you a license to use them in any fashion. Access to this Site does not confer upon you any license to the Marks under any of NXP or any third party's intellectual property rights. While NXP encourages others to link to our URL, no NXP trademark or service mark may be used as a hyperlink without NXP’s prior written permission. The following Marks are the property of NXP. This list is not comprehensive; the absence of a Mark from the list does not constitute a waiver of intellectual property rights established by NXP in a Mark. NXP, the NXP logo, NXP SECURE CONNECTIONS FOR A SMARTER WORLD, Airfast, Altivec, ByLink, CodeWarrior, ColdFire, ColdFire+, CoolFlux, CoolFlux DSP, DESFire, EdgeLock, EdgeScale, EdgeVerse, elQ, Embrace, Freescale, GreenChip, HITAG, ICODE and I-CODE, Immersiv3D, I2C-bus logo , JCOP, Kinetis, Layerscape, MagniV, Mantis, MCCI, MIFARE, MIFARE Classic, MIFARE FleX, MIFARE4Mobile, MIFARE Plus, MIFARE Ultralight, MiGLO, MOBILEGT, NTAG, PEG, Plus X, POR, PowerQUICC, Processor Expert, QorIQ, QorIQ Qonverge, RoadLink wordmark and logo, SafeAssure, SafeAssure logo , SmartLX, SmartMX, StarCore, Symphony, Tower, TriImages, Trimension, UCODE, VortiQa, Vybrid are trademarks of NXP B.V. All other product or service names are the property of their respective owners. © 2021 NXP B.V.




















