We have upgraded the community system as part of the upgrade a password reset is required for all users before login in.
spidev code for MCP3202 12-Bit A/D converter only reads 252 values
-
hello
I've connected a MCP3202 dual-channel 12-bit A/D converter to the Omega2+ to check battery voltage.
This is the datasheet of the MCP:
https://ww1.microchip.com/downloads/aemDocuments/documents/APID/ProductDocuments/DataSheets/21034F.pdfFor the measurements, I'm using Python 3 with this example code:
https://github.com/OnionIoT/python-spidev/blob/master/examples/xfer3.pyIt works but what I don't understand is that I only get values from 0 to 252. In theory, I should get values up to 4096, right?
Do I have to change the code in some way to get more values?
Thanks!