Left for archival purposes.

User avatar
By Fr4gg0r
#7906 That's why software PWM sucks. When I bought the esp I thought it had hardware pwm, just as was advertised somewhere to have hardware i2c. :evil:

Anyway, I compiled the firmware with PWM_DEPTH set to 10,000. I cannot say if it works, so please report back. Bear in mind, that there is no gpio remapping. Download here: https://github.com/jrahlf/nodemcu-firmw ... /pre_build (forum does not allow binary attachments..)
User avatar
By gwizz
#7915 The ESP chip does not yield it's secrets (e.g. promised functionality) easily. We are on a journey trying to reverse engineer the thing, practically!! I smell clues of hardware I2C, for example I think that the ADC is realised by a separate i2c ADC die internally. So it would be perfectly likely that the hints of hardware i2c pins in datasheets are true. More useful would be some hardware PWM's running at multiple frequencies, true, but everyone has their own wish list of what other little feature it would be killer to have. Mine is onboard battery management and voltage conversion so you could just plug in a couple of NiCd AA's or lipo and have it handle the whole shebang (plus monitoring, natch).

I gather that lua is designed to make it easy (somehow, I don't understand the details (yet)) to integrate C libraries?

And the PWM frequencies seem quite modest really, so some sort of code mariage seems on the cards??
User avatar
By pit
#8058 I tried changing the PWM_DEPTH but no success. I tried 2047, but the servo range actually remained the same 50...102. When compiling with PWM_DEPTH = 4095, the servo just made noise and was easily movable by hand.