Thanks for the details.
As a first try you can use the setWatch function. When the given callback is called, the parameters lastTime and time are passed to it. by doing 1/(time-lastTime) you get the frequency value.
The limitation could be the processing time of the callback, but you can go up to 1kHz easily as far as I remember. Then you can maybe adjust the RC constant of your 555 circuit in order to decrease the maximal output frequency.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Thanks for the details.
As a first try you can use the setWatch function. When the given callback is called, the parameters
lastTime
andtime
are passed to it. by doing1/(time-lastTime)
you get the frequency value.The limitation could be the processing time of the callback, but you can go up to 1kHz easily as far as I remember. Then you can maybe adjust the RC constant of your 555 circuit in order to decrease the maximal output frequency.