为什么开了定时中断串口不能接收数据 ,发送可以
arduino吧
全部回复
仅看楼主
level 11
爱吻小杰 楼主
2019年04月19日 03点04分 1
level 13
应该是代码问题
2019年04月19日 06点04分 2
看4楼代码
2019年04月21日 01点04分
level 8
是不是占用了寄存器
2019年04月19日 11点04分 3
就算是中断程序是空的也不行
2019年04月20日 10点04分
看4楼代码
2019年04月21日 01点04分
level 11
爱吻小杰 楼主
#include <FlexiTimer2.h>
void setup()
{
FlexiTimer2::set(1, 0.0040 / 1000, DRVI);
FlexiTimer2::start();
Serial.begin(38400);
}
void loop()
{
while (Serial.available() > 0)
{
Serial.println(char(Serial.read()));
delay(2);
}
}
void DRVI() {}
2019年04月21日 01点04分 4
level 11
爱吻小杰 楼主
找到原因了,这里不能小于0.008
2019年04月21日 01点04分 5
1