An abstraction library for communicating with the GQ Electronics GMC range of Geiger counters
If you are having trouble connecting your Geiger counter via USB, it's possible that the latest Prolific drivers on your PC are rejecting the chip in the device. Click here for a fix!
- GMC-320 Plus
Please make a pull request for this README if the library works on your (different) counter!
npm install --save gqgeiger
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);
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
.
Gets the current counts-per-minute value from the Geiger counter.
Arguments
- callback(mixed err, number cpm)
Gets the current dose rate from the Geiger counter in μSv/h.
Arguments
- callback(mixed err, number doseRate)
Gets the current Geiger counter battery voltage.
Arguments
- callback(mixed err, number voltage)
Gets the Geiger counter's serial number.
Arguments
- callback(mixed err, string serial)
Gets the current temperature from the Geiger counter in degrees Celsius.
Arguments
- callback(mixed err, number temp)
Gets the current gyroscope values from the Geiger counter in two-byte buffers.
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
Restarts (or starts if off) the Geiger counter.
Powers off the Geiger counter.
Powers on the Geiger counter.