[2, 228, 251, 40, 62, 72, 242, 16, 253, 0, 1, 70, 255, 59]
when the device is at rest and room temperature. With reads from the Imp under the same conditions I’m seeing values like [0, 0, 0, 0, 1, 65, 232, 1, 0, 243, 92, 245, 128, 255]
and they bounce around a lot (like I’m not reading the same registers each time). I even hard coded the read command and listened to the response in Squirrel to take out any confusion along the way but I got the same incorrect results.
register = “0x3B”;
is actually register = 0x3B.tostring();
i2c_addr = pin[0] << 1;
register = 0x3B.tostring();
numbytes = pin[2].tointeger();
local result = i2c.read(i2c_addr, register, numbytes);
2015-01-17 11:30:50 UTC-6 [Agent] ERROR: cannot convert the string
2015-01-17 11:30:50 UTC-6 [Agent] ERROR: in unknown vimp:68
2015-01-17 11:30:50 UTC-6 [Agent] ERROR: from unknown overrides:3
2015-01-17 11:30:50 UTC-6 [Agent] ERROR: from unknown vimp:31
i think this should also work:
register = 0x3B.tochar();
server.log(0x3B.tochar()); <— logs ```;```
server.log(0x3B.tostring()); <— logs ```59```
server.log(“\x3B"); <— logs ```;```
local someString = "\x00\x01\x02";
i2c_addr = pin[0] << 1;
register = pin[1];
numbytes = pin[2].tointeger();
local word = i2c.read(i2c_addr, register.tochar(), numbytes);
servo.sweep()
to work once, but it the steps were kind of erratic. And now I can't get the servo to move
Imp.prototype.sendI2CConfig = Imp.prototype.i2cConfig;
servo.sweep()
weirdness https://www.dropbox.com/s/bvbkm8mwfpr085a/servo.mov?dl=0