Update(boards): xpython板卡执行 build:prod

This commit is contained in:
王立帮
2024-10-24 22:43:42 +08:00
parent 6402bd4f68
commit 99e168f363
69 changed files with 74 additions and 80752 deletions

View File

@@ -24,6 +24,8 @@ class DS18X20:
self._ow = onewire.OneWire(Pin(pin, pull=Pin.PULL_UP))
self._buf = bytearray(9)
self._roms = self.scan()
if len(self._roms) == 0:
raise AttributeError("Cannot find a DS18X20")
def scan(self):
return [rom for rom in self._ow.scan() if rom[0] in (0x10, 0x22, 0x28)]