mirror of
https://gitee.com/openLuat/LuatOS
synced 2025-08-17 22:18:03 +08:00
update: demo,adc打印温度和电压的日志,把单位也打印出来
https://gitee.com/openLuat/LuatOS/issues/ICTBIW
This commit is contained in:
parent
dabdb3e7d1
commit
c118f044a6
|
@ -92,10 +92,10 @@ function testAdc.dotest()
|
|||
log.debug("adc", "adc" .. tostring(adc_pin_3), adc.get(adc_pin_3))
|
||||
end
|
||||
if adc_pin_temp and adc_pin_temp ~= 255 then
|
||||
log.debug("adc", "CPU TEMP", adc.get(adc_pin_temp))
|
||||
log.debug("adc", "CPU TEMP", adc.get(adc_pin_temp), "单位0.001摄氏度")
|
||||
end
|
||||
if adc_pin_vbat and adc_pin_vbat ~= 255 then
|
||||
log.debug("adc", "VBAT", adc.get(adc_pin_vbat))
|
||||
log.debug("adc", "VBAT", adc.get(adc_pin_vbat), "单位毫伏(mV)")
|
||||
end
|
||||
sys.wait(1000)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user