Query the I2C/TWI Hardware Bus
a1, a2… = twi.qy()
a1, a2… = twi.qy(devf, devt)
ok = twi.qy(dev)
Query the I2C bus.
Parameter | Type | Description |
---|---|---|
devf |
integer | First device number to query |
devt |
integer | Last device to query |
dev |
integer | Single device to query |
Returns | Type | Description |
---|---|---|
ok |
boolean | True if on the bus |
a1 , a2 … |
integers | List of devices found |
e.g.
local list = { twi.qy() }
-- -> list = {42, 73, 104}