Hey there, I've started to build an hexapod for a school project, the structure is almost completed and I was wondering how I would go about the programming. The materials I'm gonna be using are a 7.4V 4000mAh lipo hooked up to a 5V regulator, 18 servos, an arduino mega and an esp32 for WiFi control over the phone using an app called Blynk.
My current understanding of how this will all work together isn't the greatest, so I thought it would be better to have some opinions and suggestions on how to bring it to life.
At first I only wanted to use the ESP32, but I found out that it doesn't have enough PWM pins so I tried to use an MCP23017 to expand the ammount of controllable pins but after hours of trying I gave up on it and decided to use a mega with serial communication to go around the lack of pins issue. For now my plan for the program would be to receive the input from Blynk through the ESP32, send an integer depending on what the desired action is (for example, send 1 to walk forwards, send 2 to walk backwards) and have some functions on the mega to perform it. I also wanted to try and send the battery percentage to the app, but after a quick search it seems that it's hard to calculate it precisely, ignoring the problem of the controllers being connected to the same battery as every component.
I've looked into inverse kinematics and the concept is great but I can't wrap myself around how I could make such a program.
The battery works with all these components on it, due to deadlines I can't wait for a servo expansion board which I already bought so my options are limited.