Closed kazemiprince closed 1 year ago
Solved
convert function should change as below:
def convert(self):
"""Initiate one-shot conversion.
The current settings are used, with the exception of continuous mode."""
c = self.config
c &= (~MCP342x._continuous_mode_mask & 0x7f) # Force one-shot
c |= MCP342x._not_ready_mask # Convert
#print('Convert ' + hex(self.address) + ' config: ' + bin(c))
data_ = bytearray(1)
data_[0] = c
self.i2c.writeto(self.address, data_)
Does this library work with https://www.digikey.pl/en/products/detail/microchip-technology/MCP3424-E-SL/1680890 ADC? Because i cant find anything related to thie PyCom board mentioned in the description.
I have an issue when using RPi pico (microPython and MCP3424) when it's trying to convert_and_read, it gave an error as below: object with buffer protocol required
below is my code: