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

Added support for ESP32 #119

Merged
merged 1 commit into from
Jan 8, 2021
Merged

Added support for ESP32 #119

merged 1 commit into from
Jan 8, 2021

Conversation

ZwoCa
Copy link
Contributor

@ZwoCa ZwoCa commented Jan 8, 2021

Hi Sammy1Am, thank you for launching this awesome project. I've added support for ESP32 - in essence, I've added new preprocessor macros for the ESP32 specific things and ported the timer.

It's running well on my ESP32 module with INSTRUMENT_SHIFTED_FLOPPIES and NETWORK_UDP, but should also work with other instruments and networks. Of cause, it will require defining valid pins.

Since ESP32 modules usually have two cores, one could certainly optimize this and use the FreeRTOS to schedule the tick method and the readMessages method on different cores. But I am just starting to get to know the ESP platform, so I didn't look into this yet.

@Sammy1Am Sammy1Am merged commit 3bb4084 into Sammy1Am:master Jan 8, 2021
@ZwoCa ZwoCa deleted the ESP32 branch January 8, 2021 19:55
@Sammy1Am
Copy link
Owner

Sammy1Am commented Jan 8, 2021

Hey, looks great! Thank you for leaving the new esp32 bits in platformio.ini commented out so that the Uno is still the default (it makes the out of the box experience for new people easier). That's probably the fastest I've ever looked at a pull request and said, "Oh yeah, that's all fine!".

Splitting cores would definitely be worth a look for optimization (in practical terms the ESP32 clock speed is fast enough that it's rare to actually have so many notes to process that it would start to choke, but if you also wanted to control a light show or a dancing robot or something you might need those extra cycles!). Off hand I don't know if FreeRTOS's scheduling would use the hardware interrupt timer-- the timing of the tick method is sensitive since irregularities there would affect the note pitch.

I only have a small bit of FreeRTOS experience, but I think porting Moppy over might be a bit of work since the libraries we're using all assume the Arduino framework is available (maybe there's an Arduino library for FreeRTOS or they can live together though, I'm not sure)

hgrosic pushed a commit to hgrosic/Moppy2 that referenced this pull request Dec 29, 2022
Sammy1Am pushed a commit that referenced this pull request Jul 16, 2024
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

Successfully merging this pull request may close these issues.

2 participants