SHARE
TWEET

Untitled

a guest Jan 18th, 2015 242 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2. #include <wiringPiI2C.h>
  3. #define devID 0x4c
  4.  
  5. int fd,ec,ec2,adcraw;
  6. int dID = 0x4c;
  7. int main(){
  8.  
  9. fd = wiringPiI2CSetup (dID);
  10.  
  11. ec = wiringPiI2CRead(fd);
  12. ec2 = wiringPiI2CRead(fd);
  13. adcraw = (ec * 256) + ec2;
  14. printf("%i", adcraw);
  15.  
  16. return 0;
  17. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top