0

I have a problem in the configuration of the A / D converter I am working with the Pi 3B +, in case the problem is that I do not know if the configuration is ok, since it only throws a zero value corresponding to the signal of a sensor UV radiation. This is the configuration that I am giving to the converter from the raspberry pi:

spi = spidev.SpiDev () spi.open (0,0)   def ReadChannel (channel):          adc = spi.xfer2 ([6,0,0])          data = ((adc [1] & 5) << 8) + adc [2]          return data   def ConvertVolts (data, place):          #volts = (data * 3.3) / float (1023)          volts = (data * float (4096)) / 3.28          volts = round (volts, place)          volts = int (volts * 1000)          return volts

If someone can help me I would appreciate it very much

New contributor
Kevin Orozco is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

put on hold as off-topic by goldilocks Feb 12 at 18:06

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question does not appear to be specific to the Raspberry Pi within the scope defined in the help center." – goldilocks
If this question can be reworded to fit the rules in the help center, please edit the question.

  • Welcome -- but for better or worse the Stack Exchange network is English only (except for the explicitly foreign language sites, which we are not). – goldilocks Feb 12 at 18:06

Browse other questions tagged or ask your own question.