It is brilliant - lock it down.

Renaming analogWrite() is of the right scope, although I personally would be inclined not to.

mellis:

Far be it for me to say to you how to take this project, but rather than renaming it, could you just add another wrapper function around analogWrite() called pwmWrite()?

Or, alternatively, add a copy of the analogWrite() function named pwmWrite()?

I personally hate the second option, as it means duplicated code, but at the same time (although I don't know for sure), would a wrapper introduce more overhead on calls to the function because of the two levels of "indirection"? Or is the compiler smart enough to know what to do to eliminate this?

If not, you could make the function be called some other name, and make analogWrite() and pwmWrite() wrapper functions (at least then one wouldn't be slower than the other).

Then, in the documentation on the site and in the IDE, note that the analogWrite() function name is deprecated, and will no longer be supported in future versions, and that programmers should transition their code (where needed) to the new pwmWrite() function...

:slight_smile: