Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working on ESP32 #1

Closed
cybergogo opened this issue Oct 17, 2018 · 2 comments
Closed

Not working on ESP32 #1

cybergogo opened this issue Oct 17, 2018 · 2 comments

Comments

@cybergogo
Copy link

Hi All,
i've just tried this library on my esp32 and it seems it's not working at all.
I'm using the standard configuration and pin attribution on a standard esp32dev board.
The module is running fine on an Arduino Uno.
Please let me know if you have any idea about this issue.

@vincasmiliunas
Copy link
Owner

Hi,

I've freshly downloaded the ESP32 Arduino IDE package by following the new instructions - https://github.com/espressif/arduino-esp32/blob/master/docs/arduino-ide/boards_manager.md
Cloned and placed the library in the Arduino/libraries folder. It still compiles and works a year later (stable API from ESP32). The motors are spinning.

If you have working code form Arduino Uno, you just need to plugin some third party analogWrite function (or write your own, this library can be an example), that's missing form ESP32 - espressif/arduino-esp32#4 to generate PWM using the ESP32 Ledc API.

As for general tips, you should check that the pin numbers and their functions match physical wiring and Arduino code between TB6612FNG board and ESP32. Some ESP32 pins are input-only and not suitable for usage - https://www.reddit.com/r/esp32/comments/5g14iw/which_gpio_pins_are_usable/daomxrq/
Google TB6612FNG and ESP32 board pinouts and test continuity between connected pins with a multimeter.

The constructor signatures are:
Single motor: (int standby, int in1A, int in2A, int pwmA)
Dual motor: (int standby, int in1A, int in2A, int pwmA, int in1B, int in2B, int pwmB)

Also ESP32 and motors should be best powered form separate power sources (or batteries), because load from motors drops voltage, making ESP32 to brownout and hang or reboot.

Hope this helps.

@cybergogo
Copy link
Author

cybergogo commented Oct 18, 2018

Ok, have tried again with MH-ET Live Mini board, and it's working. Same for my usual esp32 devboards. this time i used the pins from the code, my god I feel stupid now. Awesome little lib !
Sorry for bothering...
and btw, thank you for the help :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants