He does some one knows. why the analoge input can only handle 1.8V with the blacklib? i am using c++ as program language. and is there a fix for it? because i am trying to het the sharp 2y0a21 to work. but the output is most of the time higher dan 1.8V.
thanks in advance 
AFAIK, the TI SoC cannot physically handle more than 1.8v
@Albert_ARIBAUD depends which SoC. The AM335x on the BeagleBoneBlack has 3.3V I/Os, as far as I know.
Digital i/o is 3.3 V, but the analog input is max. 1.8 V.
Yes, I was speaking about the 1.8v analog inputs, not the 3.3v GPIOs. And while I have not experimented with analog, I know by sad experience
that any voltage on a Beaglebone’s GPIO over 3.3v (or any voltage when the SoC is not powered) actually harms the SoC, so I would venture that the same is true for its analog inputs: never feed them more than 1.8v, and don’t even feed them that when the SoC is off.
I have fixxed it with voltage devider. Which scales the max voltage to 1.7v as analog input of the bbb. Next problem is the adc kernel driver is very bad in my opinion.
My tests shows that when u read one adc register faster dan 0.01seconds. It just gives alsways 1.8v which is not correct. This is not the only thing. When i try to read a other adc register next after the other one. I still have to wait the 0.01 seconds agian. Because the driver needs to refresh or something.
What i am currently doing it try to get the pru in the SoC to work. To give me a faster and more accurate values of all the analog inputs. I am using a c wrapper called libpruio. Which is very easy.