keyboard serial command receiver from keyboard device. (i.e. Arduino Micro)
<script src="keyserial.js"></script>
var keySerial = new keyserial({polling:true});
keySerial.onValue = function(val){
// anything
};
keySerial.onKey = function(keyCode){
// anything
};
keySerial.onString = function(str){
// anything
};
keySerial.onConnect = function(){
// device connected
};
keySerial.onDisconnect = function(){
// device disconnected
};
See /samples/device/cdssensor/cdssensor.ino
That's all! Enjoy! :D