ESP32 boards support
MCU | 2 PWM mode | 4PWM mode | 3 PWM mode | 6 PWM mode | pwm frequency config |
---|---|---|---|---|---|
esp32 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
Stm32 devices have full coagulability using the SimpleFOClibrary and will work with all driver types.
Board | Name | Specifications | Link | Price |
---|---|---|---|---|
ESP32 | (ex. NodeMCU) - 3,3V / 5V logic - 16 PWMs - all pins interrupts - 240MHz - Wifi + Bluetooth | Ebay | 10€ | |
ESP32 R32 D1 board | - 3,3V / 5V logic - 16 PWMs - all pins interrupts - 240MHz - Wifi + Bluetooth - Arduino headers | Amazon Ebay | 10€ |
Arduino IDE support package
ESP32 boards are supported using arduino-esp32 package, it is open source software provided by the espressif. You can download the support package through the Arduino Board Manager
by searching for esp32
or follow the instruction of their webpage package installation.
There is just one more thing you need to do in order to s setup the ESP32 boards with the SimpleFOClibrary. Since ESP32 support in Arduino IDE is quiet recent, there are some known bugs. You can find the github issue here. One of them is closely related to the MCPWM
class which we need to use to have smooth motor control with the ESP32. In order to resolve this bug you just need to replace one header file in the arduino-esp32 package, file mcpwm.h
.
This file is usually placed in (Windows):
C:\Users\(you user name)\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\tools\sdk\include\driver\driver
Navigate to this directory and replace the file mcpwm.h
with the file that you can download beneath:
- mcpwm.h - New fixed header file
Now your ESP32 code should be compiling and you are ready to go!