Quantcast
Channel: Intel Communities: Message List
Viewing all articles
Browse latest Browse all 17767

Re: I2C question Javascript mraa (Intel Edison)

$
0
0

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


Viewing all articles
Browse latest Browse all 17767

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>