And for input, yes, it's being done in software - if the pulses are running at 20ms it shouldn't miss any - but perhaps it is simply that you are printing too much data to send over serial?
If you did want to use hardware that should be possible - you can use the peek and poke instructions and then look at the chip's data sheet... However getting a callback when the value updates would be much more difficult I'm afraid - you'd have to poll it.
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.
Sounds great! For PWM out, try using analogWrite - there's an example down the bottom of http://www.espruino.com/Servo+Motors
And for input, yes, it's being done in software - if the pulses are running at 20ms it shouldn't miss any - but perhaps it is simply that you are printing too much data to send over serial?
If you did want to use hardware that should be possible - you can use the peek and poke instructions and then look at the chip's data sheet... However getting a callback when the value updates would be much more difficult I'm afraid - you'd have to poll it.
Hope that helps!