user10522: I have searched the Internet and found the following circuit to use with my phototransistor but it is not working, I can say so because all analog input i get is 1023 even if i have covered it totally, I have include the phototransistor and the diagram can anyone tell why is it not working!
I used this webpage to check my sensor and it works-I used this page
I have used 10kohm resistor.

This is my phototransistor


user6959: A reasonably generic data sheet is HERE
That is for an AT156 but yours may be an AT138/HT138 based on an ad some years ago from the same seller when they said they had 10,000 for sale.
Basic information here and more in the data sheet. 


user79796: First that is not even a photo resistor 2nd you have to put one wire positive and the other negitive and the last one plug it into any other gpio pin

10522: <p>I have searched the Internet and found the following circuit to use with my phototransistor but it is not working, I can say so because all analog input i get is 1023 even if i have covered it totally, I have include the phototransistor and the diagram can anyone tell why is it not working!
I used this webpage to check my sensor and it works-<a href="https://learn.adafruit.com/ir-sensor/testing-an-ir-sensor" rel="nofollow noreferrer">I used this page</a></p>

<p>I have used 10kohm resistor.</p>

<p><img src="https://i.stack.imgur.com/lGika.jpg" alt="Image of circuit"></p>

<p><a href="http://xmghdm.en.ec21.com/IR_LED_Infrared_LED_IR--3179904_3180358.html" rel="nofollow noreferrer">This is my phototransistor</a></p>

<p><img src="https://i.stack.imgur.com/JnfIZ.jpg" alt="enter image description here"></p>
 6959: <p>A reasonably generic data sheet is <a href="http://www.datasheetarchive.com/dl/Datasheets-SL3/DSASL0044436.pdf" rel="nofollow noreferrer"><strong>HERE</strong></a><br>
That is for an AT156 but yours may be an AT138/HT138 based on an ad some years ago from the same seller when they said they had 10,000 for sale.</p>

<p>Basic information here and more in the data sheet. </p>

<p><img src="https://i.stack.imgur.com/iMyu8.jpg" alt="enter image description here"></p>
 79796: <p>First that is not even a photo resistor 2nd you have to put one wire positive and the other negitive and the last one plug it into any other gpio pin</p>
