Go language command interface to the Mitsubishi Electric KD-MX series of contact image sensors.
http://www.mitsubishielectric.com/bu/contact_image/general/lineup/index.html
For information about this sensor contact Mitsubishi Electric.
The API is meant to be used in Go programs. You would normally add it to your own project using Go modules like this:
go get github.com/northvolt/go-kd6rmx
import "github.com/northvolt/go-kd6rmx"
...
// initialize sensor
cis := kd6rmx.Sensor{Port: "/dev/your-port-here"}
// load settings from user preset 1
return cis.LoadSettings(1)
// change some values
cis.PixelOverlap(true)
cis.PixelInterpolation(true)
cis.PixelResolution(600)
// save current settings to user preset 2
cis.SaveSettings(2)
kd6ctl
is a command line interface tool to allow for user configuration.
First you must obtain the git repo, and change into the new directory:
git clone https://github.com/northvolt/go-kd6rmx.git
cd go-kd6rmx
Now you can install the CLI
go install ./cmd/kd6ctl
kd6ctl help
Will output a list of commands:
USAGE
kd6ctl [flags] <subcommand>
SUBCOMMANDS
load Load user settings.
save Save current settings into a user preset.
frequency Change output frequency (in Mhz).
format Change output format.
interpolation Set interpolation on/off.
dark Dark correction on/off/adjust.
white White correction on/off/adjust/target.
led Sets LEDs on sensor on or off.
FLAGS
-p /dev/corser/XtiumCLMX41_s0 port of KD6RMX sensor to use
How to set params:
kd6ctl frequency 60.0
kd6ctl format 10 serial base
kd6ctl interpolation on
kd6ctl dark on
kd6ctl white on
kd6ctl led ab on
env GOOS=windows GOARCH=amd64 go build -o build/kd6ctl.exe ./cmd/kd6ctl
env GOOS=linux GOARCH=amd64 go build -o build/kd6ctl ./cmd/kd6ctl
env GOOS=darwin GOARCH=amd64 go build -o build/kd6ctl ./cmd/kd6ctl
env GOOS=darwin GOARCH=arm64 go build -o build/kd6ctl ./cmd/kd6ctl