/* */ #include #include #include #include #include #include #include #include #include #include "pigpio.h" /* This software reads pigpio notification reports monitoring the I2C signals. Notifications are pipe based so this software must be run on the Pi being monitored. It should be able to handle a 100kHz bus. You are unlikely to get any usable results if the bus is running at 400kHz. gcc -o pig2i2c pig2i2c.c Do something like sudo pigpiod -s 2 # get a notification handle, assume handle 0 was returned pigs no # start notifications for SCL/SDA e.g. pigs nb 0 0x3 # Rev. 1 select gpios 0/1 e.g. pigs nb 0 0xC # Rev. 2 select gpios 2/3 e.g. pigs nb 0 0xA00 # select gpios 9/11 (1<<9|1<<11) # run the program, specifying SCL/SDA and notification pipe ./pig2i2c SCL SDA 2) { gSCL = atoi(argv[1]); gSDA = atoi(argv[2]); bSCL = 1<