In other words, I need convert this arduino code in javascript code.
int soft_ver() { int data; // Software version of CMPS10 is read into data and then returned Wire.beginTransmission(ADDRESS); // Values of 0 being sent with write need to be masked as a byte so they are not misinterpreted as NULL this is a bug in arduino 1.0 Wire.write((byte)0); // Sends the register we wish to start reading from Wire.endTransmission(); Wire.requestFrom(ADDRESS, 1); // Request byte from CMPS10 while (Wire.available() < 1); data = Wire.read(); return (data); }
Thanks
jarain78