register = “0x3B”;is actually
register = 0x3B.tostring();
i2c_addr = pin << 1; register = 0x3B.tostring(); numbytes = pin.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 << 1; register = pin; numbytes = pin.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;
led.blink(), so may not be an I2C issue?
@rwaldron There are two things I would like to add to imp-io but they are not things found/done in Firmata. I think they are important given the nature of how the Imp works.
Both of this things are easily done, but for the second I need to add a command. What is the authoritative source for this list and can I add new ones?
const PIN_MODE = 0xF4; const ANALOG_WRITE = 0xE0; const SERVO_WRITE = 0xE1; const DIGITAL_WRITE = 0x90; const REPORT_ANALOG = 0xC0; const REPORT_DIGITAL = 0xD0; const I2C_REQUEST = 0x76; const I2C_REPLY = 0x77; const I2C_CONFIG = 0x78; const SYSTEM_RESET = 0xFF;