代码拉取完成,页面将自动刷新
Provides an Arduino library that uses the SPI to configure the NRF24L01 to implement data transfer.
Use NRF24L01 to achieve the specified data transmission, or point to point transmission
To use this library to download a zip file, unzip it into the Arduino libraries directory. Or use the Arduino IDE to add a ZIP library
#include <SPI.h>
#include <DFRobot_NRF24L01.h>
DFRobot_NRF24L01 MyNrf;
//Initialize the CE port and the CS port of the NRF24L01
void NRF24L01_Gpio_Init(uint8_t ce,uint8_t cs);
//Returns true if NRF24L01 is detected, false otherwise.
bool NRF24L01_check(void);
//Initialize NRF24L01
void NRF24L01_Init(void);
//Set the communication mode of the NRF24L01.(Mode: MODE_TX || MODE_RX)
void NRF24L01_Set_Mode(nRf24l01ModeType Mode);
//Set the communication speed.(Speed: SPEED_250K || SPEED_1M || SPEED_2M)
void NRF24L01_Set_Speed(nRf24l01SpeedType Speed);
//Set the power(Power: POWER_F18DBM || POWER_F12DBM || POWER_F6DBM || POWER_F0DBM)
void NRF24L01_Set_Power(nRf24l01PowerType Power);
//Get the NRF24L01 communication mode, return mode (mode: MODE_TX || MODE_RX)
nRf24l01ModeType NRF24L01_Get_Mode(void);
//Set the send address (note that the address length should not exceed 5)
void NRF24L01_Set_TxAddr(uint8_t *addr,uint8_t len);
//Set the receiving address (note that the address length should not exceed 5)
void NRF24L01_Set_RxAddr(uint8_t *addr,uint8_t len);
//send data(Note: len should be less than or equal to 32)
void send(uint8_t * value,uint8_t len);
//Configure interrupt pins and callback functions
void NRF24L01_Set_IRQ(uint8_t pin, void *callback);
//Test if chip is still sending.
bool isSending();
//Checks if data is available for reading
bool dataReady();
//Gets the received data and returns the length of the data
uint8_t getData(uint8_t *data);
Written by DFRobot_Wuxiao, 2017. (Welcome to our website)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。