[NUC123] HID RF-Mouse through RF24L01

Post Reply
chhsieh3
Posts: 309
Joined: 13 Mar 2020, 09:08

21 Apr 2020, 14:36

  • Application: The sample code is NUC123 applied to wireless mouse through RF24L01.
  • BSP Version: NUC123 Series BSP CMSIS v3.01.001
  • Hardware: NuTiny-EVB-123-LQFP64 V1.0
This sample code uses SPI0 interface to initialize RF24L01 and make it as the receiving mode to receive the data. After receiving the RF data, the corresponding data will be converted into the mouse movement direction value after processing, and the data will be uploaded to PC through USB to control the mouse action.

Use a timer to record, if 50ms does not receive data, frequency hopping once.

The IRQ (external GPIO) interrupt is used to detect whether data is received. If data is received, an IRQ interrupt will be generated. In the IRQ interrupt, if the received data flag is detected, the data will be read. If the first data is 0xAA, the second byte data will be judged and stored in the RF key variable.

You can download the sample code at https://www.nuvoton.com/resource-downlo ... 1225163829
Nuvoton

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 143 guests