Comunicações I2C entre Arduino e Raspberry Pi – Codigo teste para o Raspberry slave

  slaveTest.cpp #include <pigpio.h> #include <iostream> using namespace std; void runSlave(); void closeSlave(); int getControlBits(int, bool); const int slaveAddress = 0x03; // <– Your address of choice bsc_xfer_t xfer; // Struct to control data flow int main(){ // Chose one of those two lines (comment the other out): runSlave(); //closeSlave(); return 0; } void runSlave() …