Skip to content

tadfmac/keyserial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

keyserial.js

keyboard serial command receiver from keyboard device. (i.e. Arduino Micro)

usage (Web App)

initialization

<script src="keyserial.js"></script>
var keySerial = new keyserial({polling:true});

handling numeric data

keySerial.onValue = function(val){
	// anything
};

handling primitive keycode

keySerial.onKey = function(keyCode){
	// anything
};

handling serial charactors

keySerial.onString = function(str){
	// anything
};

device connection

keySerial.onConnect = function(){
	// device connected
};

keySerial.onDisconnect = function(){
	// device disconnected
};

usage (Arduino)

See /samples/device/cdssensor/cdssensor.ino

That's all! Enjoy! :D

About

keyboard serial command receiver from keyboard device.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published