我用的是sevseg数码管显示库来做的 在loop函数里最后是刷新了 也设置了自加数用来延时但是还是刷新的很快 我又想用timerone库来设置定时器减缓刷新频率 但是不知道怎么写 故来求助
#include "SevSeg.h"
SevSeg sevseg;
byte weishu=4;
byte hardwareConfig=COMMON_CATHODE;
byte duanwei[]={10,11,12,13};
byte yinjiao[]={2,3,4,5,6,7,8,9};
int Digital_Value=0;
float temp_Value=0;
int count;
void setup() {
// put your setup code here, to run once:
sevseg.begin(hardwareConfig,weishu,duanwei,yinjiao);
pinMode(A0,INPUT);
}
void loop() {
// put your main code here, to run repeatedly:
count++;
if(count==2000){
count=0;
Digital_Value=analogRead(A0);
temp_Value=(float)Digital_Value/1024500.00;
sevseg.setNumber(temp_Value100,2);
sevseg.refreshDisplay();
}
}