I need 2 raspberry pi for my project (i'll use all pins on both pi's) and i want to control them with an interface on my laptop (used python tkinter) but i couldn't figured how to use both pi's. Maybe a cluster can solve my problem?
Someone Deleted the main question so I'm editing again : How can I use pins in a cluster ? What will be the pin numbers (like GPIO 20) ? If i connect two rasperry pi, second one's pin numbers start from 41 or what ? I'll use only one lan cable to control raspberrys so I want to know how would I name the pins.
The main goal is making an rc submarine so i need control 4-5 l298n motor driver and lots of sensors like temperature or distance.
An example code for controlling l298n motor driver :
import RPi.GPIO as gpio import time def init(): gpio.setmode(gpio.BCM) #Motor1 gpio.setup(17, gpio.OUT) gpio.setup(22, gpio.OUT) #Motor2 gpio.setup(23, gpio.OUT) gpio.setup(24, gpio.OUT) def pump(): init() print ("Motor1 Forward Motor2 Off") #Motor1 (Forward) gpio.output(17, True) gpio.output(22, False) #Motor2 (Off) gpio.output(23, False) gpio.output(24, False) def depump(): init() print ("Motor1 Reverse Motor2 Off") #Motor 1 (Reverse) gpio.output(17, False) gpio.output(22, True) #Motor2 (off) gpio.output(23, False) gpio.output(24, False) def stoppump(): init() gpio.cleanup()
As we see for two motor we need 4 pins, I need 8-10 motors.