SWButtons.js module code

SWButtons.js module code makes many software buttons out of the single user BTN1 on Espruino board. Sequences of short and long presses a-la Morse Code are detected and passed as string containing S and L characters to a user defined callback function for further processing.