Now it is time to build the car. Well let’s check if everything is alright.
First the electronic: we have a good number of modules to connect to the Arduino:
- The H-bridge takes 3 pins per motor so a total of 6 output pins
- The opto couplers use 2 pins
- The ultrasonic distance module use 2 pins each
- One pin for the on-off switch
- 4 pins for the signal LEDs (2 front, 2 back)
This makes a total of 17 pins but the Arduino mini pro provide only 13 digital pins. There is a solution to add port to the Arduino. The FCP8574 provides 8 additional digital pins than can be accessed using the I2C protocol. This protocol is also used to communicate with the XYZ magnetometer. With this protocol you can interface multiple modules using only two outputs (SLC,SDA).