Go Down

Topic: I2C comms via Windows Remote Arduino (Read 6801 times) previous topic - next topic

paulfo

Hi,

I'm trying to use the Windows Remote Arduino code with I2C devices on a sensor shield. The issue I have is the I2C write function. Its parameters are address and string data. So address I take to be my slave address. The data should be a target register and the value to be written. If this is correct, what format is the data string in? ie there must be a separator between register and value??

I can correctly read Who-Am-I values from the devices, but without a value write function I can't configure the devices.

Any one got Windows Remote Arduino I2C working?

Cheers
Paul

paulfo

Eventually got to the bottom of it:


            string msg1 = "" + (char)0x39 + (char)0x00; // where 0x39 is register, 0x00 is data
            arduino.I2c.write(D20Hhi, msg1); // where D20Hhi is device address

dbarnes6891

Could you share your code?  I'm working on a windows remote arduino project as well and I'd like to see how you have yours set up.  Any help is appreciated.

Go Up