An abstraction library for communicating with the GQ Electronics GMC range of Geiger counters
npm install gqgeigerAn abstraction library for communicating with the GQ Electronics GMC range of Geiger counters
Please make a pull request for this README if the library works on your (different) counter!
bash
npm install --save gqgeiger
`Quick Example
`javascript
const GQGeiger = require('gqgeiger');const myGeiger = new GQGeiger("COM4", 9600);
setInterval(function(){
myGeiger.getCPM(function(err, cpm){
if(err){
console.log(err);
return;
}
console.log(cpm);
});
}, 2000);
`API
new GQGeiger(string portName, number baudRate)
Connects to the Geiger counter.__Arguments__
* portName - The name of the port to open. Windows ports are typically labeled
COMn, where n is the port number.
* baudRate - The baud rate of the device. The default for the GMC-320 is 9600`.__Arguments__
* callback(mixed err, number cpm)
__Arguments__
* callback(mixed err, number doseRate)
__Arguments__
* callback(mixed err, number voltage)
__Arguments__
* callback(mixed err, string serial)
__Arguments__
* callback(mixed err, number temp)
__Arguments__
* callback(mixed err, object gyro)
* gyro.x - Two-byte buffer of the x value of the gyroscope
* gyro.y - Two-byte buffer of the y value of the gyroscope
* gyro.z - Two-byte buffer of the z value of the gyroscope