I am working on a 4WD car project and I'm using the following electronic parts:
- H-Bridge, L298N: 2 PWM pins and 4 direction contol pins
- 8 Ultrasonic sensors, HC-SR04: 2 pins, for TRIG and ECHO
- IMU, MPU6050: 2 pins, I'm not sure
- 2 Speed Sensors, H206: 1 output pin
- Servo Motor: 1 PWM pin
There are 40 pins on the Raspberry Pi; a few are reserved for ground and 5v power supply and the PWM output can be controlled with certain pins. So I'm assuming that I need to increase the number of GPIO pins with an I/O expander like the MCP23017, or can I make it work on the same Pi?