找回密码
 立即注册

QQ登录

只需一步,快速开始

打印 上一主题 下一主题
开启左侧

[NUC123] HID RF-Mouse through RF24L01

[复制链接]
跳转到指定楼层
楼主
admin 发表于 2023-4-6 17:55:35 | 只看该作者 回帖奖励 |正序浏览 |阅读模式


  • 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
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 顶 踩
牛卧堂
回复

使用道具 举报

高级模式
B Color Image Link Quote Code Smilies |上传

本版积分规则

新唐MCU