This demo is based on the Wireless UART example from the SDK available on Welcome | MCUXpresso SDK Builder selecting the QN908X board.
The main idea of this demo is to be able to send commands from one device to another, it could be from a QN9080DK, a phone using our NXP application: IoT Toolbox or even an FRDM-KW41Z, this is possible because of the BLE protocol used in all our devices.
The end-device used is a QN9080DK, this board receives the message, does parsing and triggers a PWM function using the values sent from another device. This signal can be used in different applications, typically controlling smart lighting brightness and color, speed of motor controls and audio or video amplifiers. The goal of this demo is to implement a task for our FreeRTOS scheduler in order to be able to control a PWM while the BLE connection is still running and receive new incoming messages.
Useful documentation is available in the SDK previously downloaded: <SDK Installation folder>...\SDK_2.2.1_QN908XCDK\docs
Link | Description |
---|---|
https://www.nxp.com/webapp/Download?colCode=QN908x-DK | QN908xDK User’s Guide |
Welcome | MCUXpresso SDK Builder | SDK Builder site |
Wireless Connectivity | NXP Wireless Community |
Connectivity Software: Implement tickless mode in FreeRTOS | Document for implementing a new task using OSA Abstraction layer of FreeRTOS |
https://www.nxp.com/docs/en/nxp/data-sheets/QN908x.pdf | QN908x Datasheet for pins functions |
Link | Description |
---|---|
QN908x: Ultra-Low-Power Bluetooth Low Energy System on Chip (SoC) Solution | NXP | It is required at least one as an end-point. |
Oscilloscope | An Oscilloscope to visualize the PWM. |
1. After the QN9080 is flashed and in Advertising mode, we have to connect our Central device, Which in this case is an Android phone. In or Teraterm we should be able to see this message:
2. Then, we get the Connected status from our devices and we should be able to send the ON command and the RGB values, Teraterm indicates the integer values and the string received.
3. When we send the OFF command the PWM signals should be 0 V.
4. Here is another example:
Dear Adrian Puga Candelario,
This document has superbly written, and I have a client who looking for exactly the same solution (only based on QN9090).
I would be glad if you could please re-upload the project file again. ("qn908xcdk_wireless_uart_peripheral2.zip 2.9 MB")
The file has been deleted from the NXP server, since this file may contain a virus or malware.
Thanks in advance
Kind regards,
Shai