标题:
nrf24l01与stm32f103查询接受发送程序源码
[打印本页]
作者:
假大宝剑
时间:
2018-8-20 10:28
标题:
nrf24l01与stm32f103查询接受发送程序源码
24l01与stm32f1查询接受发程序源码,这个程序有祝大家学习参考24l01与stm32f1原理。
0.png
(43.22 KB, 下载次数: 46)
下载附件
2018-8-20 18:02 上传
单片机源程序如下:
#include "includes.h"
int main()
{
u8 tmp_buf[3],i;
NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2); //设置NVIC中断分组2:2位抢占优先级,2位响应优先级
delay_init(); //延时函数初始化
TIM4_Init(9,7199);//Tout(溢出时间)=(ARR+1)(PSC+1)/Tclk =10*7200/72000000s=1ms
LED_Init();
USART1_Init(115200,0); //串口初始化为115200
delay_us(500);
NRF24L01_Init(); //初始化NRF24L01
while(NRF24L01_Check())
{
printf("NRF24L01 Error\r\n");
delay_ms(1000);
}
printf("NRF24L01 OK\r\n");
delay_ms(1000);
NRF24L01_RX_Mode();
delay_ms(1000);delay_ms(1000);
while(1)
{
while(NRF24L01_RxPacket(tmp_buf)!=RX_OK)
{
// printf("Rx Failed\r\n");
}
// printf("Rx ok\r\n");
for(i=0;i<3;i++)
printf("%d,",tmp_buf[i]);
printf("\r\n");
// else
// {
//
// }
}
}
复制代码
所有资料51hei提供下载:
nrf24l01_STM32F103C8T6查询接收发.rar
(900.47 KB, 下载次数: 84)
2018-8-20 18:02 上传
点击文件名下载附件
24l01与stm32f1查询接受发程序源码
下载积分: 黑币 -5
作者:
renyicqupt
时间:
2019-5-24 16:18
楼主在吗?请教您这个怎么接线?
欢迎光临 (http://www.51hei.com/bbs/)
Powered by Discuz! X3.1