Ok, sounds like you need four bi-directional motor drivers, and one uni-directional motor or solenoid, depending on how the gun is fired.
For the four bi-directional motors:
Each motor will require 2 or 3 I/O's, depends on type of motor driver.
EN, DIRA, DIRB - requires 1 PWM, 2 I/O's per motor
EN, DIR - requires 1 PWM, 1 I/O per motor
DIRA, DIRB - requires 2 PWM per motor
so you require 4 - 8 PWM's and 0-8 additional GPIO's depending on motor type.
You will also need:
- 2 limit switches for turret up/down
- 2 limit switches for turret turning
for an additional 4 I/O's
Plus one I/O per LED.
You need to find out the voltage and stall current of the motors in the tank, so you can select an appropriate dual H-bridge driver board.
Models A & B would likely not have enough I/O to do what you want, an A+ / B+ / 2 should work, with joan's pigpio library, and appropriate driver boards.
Two L298N or three modules should work, if the motors do not require more than about 1.5A current during normal operation.
Or, if you want a lot more I/O, you could use a RoboPi in addition to your Raspberry Pi (see
http://RoboPi.com)
teuma86 wrote:I believe standard LEDS (5mm)
Trying to work it out. This particular model for the tank has 5 motors but my project I am looking at 8, yes ideally bi-directional
Tank motors
2 to drive (Left and Right)
1 Move torrent around
1 Moves torrent up / down
1 fires gun (not seen this motor but i believe this can be one direction.