Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <wiringPiI2C.h>
- #define devID 0x4c
- int fd,ec,ec2,adcraw;
- int dID = 0x4c;
- int main(){
- fd = wiringPiI2CSetup (dID);
- ec = wiringPiI2CRead(fd);
- ec2 = wiringPiI2CRead(fd);
- adcraw = (ec * 256) + ec2;
- printf("%i", adcraw);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement