I'm working on a project to make a remote controlled cart using an Arduino Uno R4 WiFi and an arduino nano esp32 and I need a little guidance. My idea is to control the speed of the cart and its direction using the ArduinoBle library and the following components:
TB6612FNG motor driver:
The motors will be connected to the controller.
Iplan to use pins D5 and D6 to control the speed of the cart (PWM).
Servo for steering:
• I will connect a servo to pin D3 to control the direction (left and right).
I greatly appreciate any advice, links to resources or ideas you can share with me. Thank you!
I used PWM as the library search argument, look at the size of the scroll bar thing, that indicates dozens if not more libraries match PWM. Time to start reading each description and I always check the author to see if he is known to me.
Which of the two devices is on the cart, and needs to run the motors with PWM.
It appears that you will be using BLE to send a duty cycle value, direction, and other commands. In my experience it is always best to set up the peripheral device and use a phone for the central to get started, before trying to implement the central on another MCU.
Why have you chosen these two devices? BLE is not the most simple method of wireless communication.
For safety of the cart and it's surroundings, you need to have a message being received at the cart every second or so. If no message, stop all activity.