nRF5 SDK v14.0.0
ANT I/O
This example requires the following SoftDevice: S212

Important: Before you run this example, make sure to program the SoftDevice.

The ANT I/O example was designed to showcase basic bidirectional communication between two nodes that are using ANT, with the LEDs on one node displaying the state of the buttons pressed on the other node. You can use this demo with either one development board and one ANT USB stick connected to the PC application ANTware or with two development boards.

You can find the source code and the project file of the example in the following folder: <InstallFolder>\examples\ant\ant_io_demo\ant_io_tx

You can find the source code and the project file of the example in the following folder: <InstallFolder>\examples\ant\ant_io_demo\ant_io_rx

ant_io_antware.svg
ANT I/O example with ANTware
ant_io_two_boards.svg
ANT I/O example with two development boards

Testing

Note: You can use a custom channel or encryption when running any of the ANT examples. When adding a new channel or encryption, remember to update ANT stack configuration.

You can test the ANT I/O example in the following ways:

Testing the ANT I/O TX example using ANTware II

  1. Compile and program the ANT I/O TX example.
  2. Run ANTware II. From the available devices, select your ANT PC dongle (for example, ANTUSB-m). Configure the device channel by loading the device profile configuration from the following file: <InstallFolder>\examples\ant\ant_io_demo\ant_io_tx\ant_io_tx_test.xml. Alternatively, you can configure the device channel manually:
    1. Set the channel assignment to slave.
    2. Set the channel ID to 0, 3, 1.
    3. Keep the default values for all other settings.
  3. Click Auto-Open.
  4. Once the slave endpoint has acquired the master (indicated by receiving broadcasts in the ANTWare Log window), you can begin to test the buttons and LEDs on the board.
  5. Open the Simulation tab on the right-hand side of the ANTware application. Modify the Respond With field to either of these values:
    TX Buffer Value Description
    01-00-00-00-00-00-00-FE Turns on BSP_LED_0 on the board.
    01-00-00-00-00-00-00-FD Turns on BSP_LED_1 on the board.
    01-00-00-00-00-00-00-FB Turns on BSP_LED_2 on the board.
    01-00-00-00-00-00-00-F7 Turns on BSP_LED_3 on the board.
  6. Select the Auto Send Response to Received Msgs check box. ANTware will now respond with its own message every time it receives an ANT broadcast message to control the LEDs on the board.
  7. The buttons on the board will allow you to modify the contents of the broadcast messages that are transmitted to ANTware.

Testing the ANT I/O TX example with the ANT I/O RX example

  1. Compile and program the ANT I/O TX example.
  2. Compile and program the ANT I/O RX example.
  3. Press the buttons on one of the nodes to control the state of the LEDs on the other node.

Documentation feedback | Developer Zone | Subscribe | Updated