Posting this in Newbie Corner, since I'm not entirely sure which section would be best for this
I am developing a small Li-Po (10,000 mAh) powered robot (about 12x7cm large). This robot is intended to be autonomous, with an option for me to take over the controls remotely. The sensor array will include a ultrasonic sensor, several infrared proximity sensors, single pixel thermal imaging, PIR sensor, light-sensitive resistor, a compass/accelerometer, etc, as well as a FPV camera for manual control. Up until now, I tested this successfully with Atmega328P (on Arduino Nano), using Bluetooth for communications with a smartphone for manual control, and TX-02 radio FPV camera to display video on my computer. Unfortunately, the range of Bluetooth module (HC-05) and this TX-02 camera is very limited, so I decided to switch to WiFi for communications. And since using ESP8266 as a module for Arduino doesn't make much sense (ESP being much more powerful), I decided to remake the whole project using ESP8266 as the microcontroller for this robot.
Basically what I need is for ESP8266 to control all the modules of this robot, receive instructions and feed back video and various information back to my computer over WiFi.
Problem is, ESP8266 has fewer GPIO pins than Atmega328P, and only one analog pin (I need two). Additionally, all the cameras I found that could interface with ESP8266 and allow it to feed video over Wi-Fi to my computer, require A LOT of pins... Nearly all of what ESP8266 has. My target is OV7670, as I've seen several tutorials of people making it work with ESP8266 and feed video over Wi-Fi real-time with decent FPS.
Thing is, since I need so many other modules to control (sensors I mentioned, motor controls, LEDs, buzzer, etc.), there aren't nearly enough pins on ESP8266. Therefore, I'm thinking of using i2c port expanders like PCF8575 to be able to interface with all these modules on the few pins that ESP8266 has. However, I haven't seen anyone use OV7670 or similar cameras with ESP8266 using port expanders, and I am wondering if this is at all possible. Additionally, I remember reading that if I use a camera via i2c via SDA and SCL pins on ESP8266, I won't be able to use any other i2c devices (compass, infrared imaging and some other devices need i2c) on these pins, including other port expanders. To solve this, I am thinking of including software-i2c libraries to to use other pins as SDA/SCL for other i2c devices and port expanders.
My question is, would this work? Can I use OV7670 with ESP8266 over port expanders? Can I use other i2c devices on the same SDA/SCL pins, or will I need to use software i2c libraries? Is this whole setup at all possible? Are there any possible issues or considerations that I haven't addressed?
I was considering to use ESP32 instead... But it seems like an overkill just for these extra GPIO pins. Battery life is a consideration here (I will have multiple MOSFETs switching various modules on and off to save battery power, so even more pins needed).
I would really appreciate your input. I know I could test these theories on a breadboard, but as you can see from my links, I am shipping all my electronics from China (most of that stuff is not available locally, or expensive as hell), and I have to wait up to 2 months for shipping, so I want to make sure I'm ordering the right stuff that will actually make it possible for me to make this project real
I hope I didn't forget to include some important details about this project. If I did, let me know. Thank you.