Chelsea, As was mentioned, the BBB input pins can't be more than 1.8V so you will need a voltage divider to take your power supply voltage down between 0 and 1.8V. This page might help you: http://www.alfonsomartone.itb.it/hclbmf.html
And it is possible you have already damaged that pin if you connected up anything more than 1.8V so when you make your resistor divider circuit and try it, if it doesn't work, try another ADC input pin. Also test the divider circuit with a volt meter first to be sure the max voltage of your power supply presents a max of 1.8V on the voltage divider circuit. Doug <http://www.alfonsomartone.itb.it/hclbmf.html>On Wednesday, February 10, 2016 at 1:54:54 PM UTC-8, Chelsea Orefice wrote: > > Hi All, > > I have a new BBB. I'm trying to read voltages from a DC power supply. I'm > having trouble doing so. I connected the output from the power supply to > AIN0, and the ground from the power supply to the ADC_GND, and tried to run > the code, but the voltages that I'm reading doesn't make sense. > > So I went back to the basic, and just ran the code without plugging > anything in, and yet the voltage value I'm printing says 1.6 instead of 0. > Below shows the code, which I got from adafruit. I'm aware that I'm not > supposed to connect BBB ADC to anything above 1.8V or below 0V, which I > don't believe I have. > > import Adafruit_BBIO.ADC as ADC >> ADC.setup() >> value = ADC.read("P9_40") >> voltage = value * 1.8 >> print (voltage) > > > > https://learn.adafruit.com/setting-up-io-python-library-on-beaglebone-black/adc > > I've also been reading somewhere that I may have to enable the ADC before > I can read it?? > > Help? > > Thanks. > -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.