9ed9807854
Change-Id: I1e5f87f15f0ca9586d8185316ffcaeef6d9d4d38
11 lines
No EOL
233 B
Lua
11 lines
No EOL
233 B
Lua
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 |