I'm working through the programming training I went through the optional LED portions, since I already had all the parts. The RGB LED section uses PWM and I Googled to figure out which Mayfly pins had PWM, but I didn't understand the difference between the sets of PWM pins. Conceptually I get the difference between the 8 and 16 bit, but why are there separate timers. It worked by using D6, 7, and 11, but I don't know if I just got lucky.
Answer:
That's awesome that you got the optional LED portion of the LearnEnviroDIY tutorial working with the Mayfly.
Off the top of my head, I don't know which pins on the Mayfly work with PWM (since none of the sensors I use operate with PWM). Our original version of the tutorial required an Arduino Uno for episodes 1-2. Adding PWM pin info for the Mayfly would be a good request for an update to the tutorial, here: https://github.com/EnviroDIY/LearnEnviroDIY/issues (feel free to add other suggestions too!).
Since you got it to work, rather than finding the answer, I'll point you to how I would look.
These are a bear to dig through, but from what I can tell any of the pins labeled "OCnx" (such as OC1A, OC1B, OSCA, etc.) can use PWM. From the Mayfly schematic, this correspond to D4-D7 and D11-12. Two other OCnx pins on the 1284P chip are used for other functions on the Mayfly and are not available to the user.
Given the work by @SRGDamia1 and @s-hicks2 to update the documentation and code in the EnviroDIY_Mayfly_Logger repository, it's time to start leveraging all that good material for this tutorial!
I need to update Part 2 to work seamlessly with the latest version of ModularSensors, which is presently v0.24.1, but will likely be updated to v0.25.0 before we begin. The online tutorial was last updated in May 2019 for v0.21.3, and the changes are substantial.