Audio User Data

Description

This application uses the SPARK Wireless Core to send data in addition to the audio stream. It uses the “User Data” feature of the SPARK Audio Core to enable sending data inside the audio packet. Communication is between a Coordinator device and a Node device.

Behavior

The exchange of information is made possible by the Audio Core user data processing stage. This processing stage appends 1 byte of user data to the transmitting device’s audio samples. The receiving device uses the same processing stage to decapsulate this byte and triggers a callback function.

In this application, the Coordinator device’s switches are used to change the value of the user data. A LED is used on the Node device’s to reflect the value of the received user data.

The following diagram illustrates the general structure of the schedule used in this application.

Audio User Data schedule

Figure 20: Audio User Data application’s schedule.

Coordinator Device

  • Pressing SW1 or SW2 turns on or off LED2 on the Node respectively.

  • LED0 toggles every time a packet is successfully transmitted to the Node (almost always on because of the high packet rate).

Interface

Name

Description

SW1

Turn ON LED

Send SW1 state to Node and turn ON its LED2.

SW2

Turn OFF LED

Send SW2 state to Node and turn OFF its LED2.

LED0

Transmission Success

Toggle LED when a wireless transmission is successful.

LED1

N/A

N/A

LED2

N/A

N/A

Node Device

  • SW1 and SW2 are used to turn the volume up and down respectively. By default, the volume is at the maximum level.

  • LED1 toggles every time a packet is successfully received from the Coordinator (almost always on because of the high packet rate).

  • LED2 is turned on or off when a SW1 or SW2 press event is received from the Coordinator.

Interface

Name

Description

SW1

Volume Up

Raises the volume (default at 100%).

SW2

Volume Down

Lowers the volume.

LED0

N/A

N/A

LED1

Reception Success

Toggle LED when a wireless reception is successful.

LED2

Switch Press Event

Turn on or off depending on the Coordinator switch press event.

Configuration

This application does not require specific configurations.