It basically just detects the large changes in the signal caused by the transition from 0 to 1 and vice versa. Currently you're using buffers - so you might be able to do something similar I guess (the oscilloscope reads continuously)
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.
Great - glad it's going!
To send from Espruino I'd just use
digitalPulse(pin, 1, array_of_data)
where you give it an array of times in msec foron,off,on,off,on
and so on...To read it back you could take a look at the little oscilloscope page I made: https://github.com/espruino/webaudio-oscilloscope
It basically just detects the large changes in the signal caused by the transition from 0 to 1 and vice versa. Currently you're using buffers - so you might be able to do something similar I guess (the oscilloscope reads continuously)