blob: def7b5d84c124168fef42154366f5fbd23e48082 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
I2CSCAN = {}
function I2CSCAN.scan()
STMP.i2c.init()
STMP.i2c.set_speed(true)
for i = 2, 254, 2 do
if STMP.i2c.transmit(i, {}, true) then
print(string.format("%#x OK", i))
end
end
end
|