Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
UPDATE: a further developed port for RP2040 and ESP32 is here
==========================================
Hi Nick,
I really love you work and extensive documentation! However, I didn't have a Teensy laying around, and wanted to try things out right now... So I made a ESP32 port, keeping the original code untouched as much as possible. Maybe this is something you want to include in your repository?
Thanks & greetings, Hugo
Ported & tested
USE_PPM_RX
USE_MPU9250_SPI
Ported but untested
USE_MPU6050_I2C (compiles, but I don't have a MPU6050 to test)
Not ported
USE_PWM_RX
USE_SBUS_RX
USE_DSM_RX
Changes
Add SPI & I2C pin selection
Change hardcoded LED output pin to constant ledPin
Use ESP32_PWM.h for servo and oneshot
Replace Oneshot pin-set-wait-clear code in commandMotors() with ESP32_PWM running at 2000Hz
Change m1_command_PWM, server1_command_PWM, ... from int to float for increased PWM resolution
Add variable loop_us to measure runtime of loop()
Performance
On ESP32 240MHz the loop() runtime with MPU9250 is 400 us. This gives 100 us headroom at 2000 Hz.
The heaviest function is getIMUdata(), which takes 250 us, so the rest of loop() only takes 150 us.