51uwb.cn

 找回密码
 立即注册
查看: 3516|回复: 1
打印 上一主题 下一主题

【刷新频率】1标签2基站串口发送数据频率提高不上来

[复制链接]

73

主题

249

帖子

6806

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
6806
楼主
发表于 2020-2-22 18:14:04 | 显示全部楼层
参考如下配置:


这个配置下频率应该在12-14Hz,如果再快,最直接方法需要把液晶显示部分注释掉,例如如下代码,因为每次都显示,当频率较高的时候,液晶显示会占用大量时间
  1.     if(Anthordistance_count[0]>0)
  2.     {
  3.         sprintf(dist_str, "an0:%3.2fm", (float)Anthordistance[0]/1000);      
  4.         OLED_ShowString(0, 2,dist_str);
  5.     }

  6.     if(Anthordistance_count[1]>0)
  7.     {
  8.         sprintf(dist_str, "an1:%3.2fm", (float)Anthordistance[1]/1000);      
  9.         OLED_ShowString(0, 4,dist_str);
  10.     }

  11.     if(Anthordistance_count[2]>0)
  12.     {
  13.         sprintf(dist_str, "an2:%3.2fm", (float)Anthordistance[2]/1000);      
  14.         OLED_ShowString(0, 6,dist_str);
  15.     }
复制代码


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

bphero Inc.  

GMT+8, 2024-5-4 07:57 , Processed in 0.012130 second(s), 6 queries , File On.

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc. Template By 【未来科技】【 www.wekei.cn 】

快速回复 返回顶部 返回列表