Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added compatibility to access shorted and open detection from the status register.
Two new accessors are as follows
is_shorted() = returns bit 6 from status register
is_disconnected() = returns bit 5 from status register
because bit 5 is shared between MCP9600 and MCP9601 it also indicates if the voltage is outside of range for the MCP9600.
Therefore a new accessor was added to make it compatible for MCP9600
is_in_range() = returns bit 5 from status register.
The CHIP_ID remains the same, but the CHIP_ID2 was added in the check to make sure that the chip_id returned from the CHIP_ID register is either 0x40 or 0x41
Updated the version from 0.0.4 to 0.0.5.
Tested on a raspi with breakout board on Feb 28, 2022