I use RaspberryPi3 with Python to Remote control GPIO of other RPIs.
I created a class to initialize connections and pin for all Pis:
class relay(pigpio.pi): def __init__(self,ip_addr): pigpio.pi.__init__(self) self.GPIO=[4,5,6,12] self.rpi=pigpio.pi(ip_addr) for t in range(len(self.GPIO)): self.rpi.write(self.GPIO[t],0) def switch_state(self,i,state): self.rpi.write(self.GPIO[i],state) pi_1=relay('192.168.2.112') # creating first Rpi link pi_2=relay('192.168.2.113') # creating second Rpi link x=0 pi_1.switch_state(x,0) how can I inherit pigpio module's attributes into relay ? in order not to create switch_state as I did, but to use read, write and more that belong to pigpio