Hi There.
I have managed to buy I2C 8 relay (230V/10A) board that I have tested with Raspberry Pi.
http://www.byvac.com/index.php/BV4627
This works with Pi:
i2cset -y 1 0x32 10 1 0 1 i (turns on first relay)
i2cset -y 1 0x32 10 0 0 1 i (turns off first relay)
Oddly when I run the code in IMP:
for (local i = 2 ; i < 256 ; i+=2) {
if (i2c.read(i, “”, 1) != null)
server.log(format(“Device at address: 0x%02X”, i));
}
Result is “Device at address: 0x64”.
I got the address 0x64, instead of Pi’s 0x32… odd
Well, now with above example, how do I write with IMP?