def:自动计数问题,一直想使用sleep,go之后发现arduino的sleep是cpu挂起和终端的相关内容,以为没有此类方法
add:http://arduino.cc/en/Reference/Delay
解释:看arduino的Reference时发现delay不就是自己要的sleep吗?只是毫秒单位,自己的目标是x小时,只是担心delay过长芯片是否有其他意外,但这个可以测试啊,嘻嘻,如果这样就不用调试时钟芯片了,测试一下吧!:)
说明:
Certain things do go on while the delay() function is controlling the Atmega chip however, because the delay function does not disable interrupts. Serial communication that appears at the RX pin is recorded, PWM (analogWrite) values and pin states are maintained, and interrupts will work as they should.
[popexizhi]这样看来delay中没有考虑中断问题,自己的如果使用这个计时在使用终端并用时会有问题,好吧还是先测试一下效果吧.
add:http://arduino.cc/en/Reference/Delay
解释:看arduino的Reference时发现delay不就是自己要的sleep吗?只是毫秒单位,自己的目标是x小时,只是担心delay过长芯片是否有其他意外,但这个可以测试啊,嘻嘻,如果这样就不用调试时钟芯片了,测试一下吧!:)
说明:
Certain things do go on while the delay() function is controlling the Atmega chip however, because the delay function does not disable interrupts. Serial communication that appears at the RX pin is recorded, PWM (analogWrite) values and pin states are maintained, and interrupts will work as they should.
[popexizhi]这样看来delay中没有考虑中断问题,自己的如果使用这个计时在使用终端并用时会有问题,好吧还是先测试一下效果吧.
没有评论:
发表评论