mitutoyo
: A library for the Mitutoyo Digimatic (SPC) protocol.¶
This library is an implementation of the Mitutoyo Digimatic protocol used to read data from gauges and scales.
It was written as a first project with CircuitPython. Data used to implement this were Mitutoyo datasheets.
- Author(s): Adrian “vifino” Pistol
Implementation Notes¶
Hardware:
- You need the ‘data’ and ‘clock’ pins configured as inputs with pullup. They are pin 2 and 3 on a Digimatic 10-pin cable.
- Connect the ‘req’ pin to a NPN with a 10kΩ resistor and the open collector output to ‘!req’. On a Digimatic 10-pin cable, ‘!req’ is pin 5.
- Optionally, you can connect ‘ready’ as an input with a pullup to know when to read. On a Digimatic 10-pin cable, ‘ready’ is pin 4.
Software:
- CircuitPython 5.0 tested, older versions should work. MicroPython should also work, thanks to Adafruit Blinka.
-
class
mitutoyo.
Digimatic
(**args)¶ Mitutoyo Digimatic SPC implementation for CircuitPython. Provide either ‘req’ or ‘nreq’. ‘req’ takes precedence.
Parameters: -
class
Reading
(value, unit)¶ A Reading from a Mitutoyo Digimatic instrument.
-
read
()¶ Attempt to read a value from the connected instrument.
Returns: A reading or none if data is unparsable Return type: mitutoyo.Digimatic.Reading
-
class