<p>type: type is either string “long” or “short”. long: press the key for 3 seconds, short: press shortly(less than 3 seconds)<br/><br/>
function(): user defined function which is called when key is pressed. If nil, cancling the user defined function.<br/><br/>
Default function: long: change LED blinking rate, short: reset chip</p>
<strong>-Note:</strong> setup pwm frequency will synchronously change others if there are any. Only one PWM frequency can be allowed for the system.</p>
<p>event: string, which can be: “connection”, “reconnection”, “disconnection”, “receive”, “sent”<br/><br/>
function cb(net.socket, [string]): callback function. The first param is the socket.<br/><br/>
If event is”receive”, the second param is received data in string.</p>