loading

Can anyone help me with useing a QTI sensor with the Arduino?

Im working on a line following robot and have some QTI sensors from my basic stamp days I wanted to use them with the Arduino but cant seem to get the Arduino to read them
Would really like any help I can get

sort by: active | newest | oldest
As always, show your circuits.

Steve
TheMONKEY (author)  steveastrouk5 years ago
My circut is pretty much black to ground white to 5v and red to pin just like they are supposed to be connected
My main question is how to get the Arduino to read them and or some help with the code that will help
OK, what code have you tried ?
TheMONKEY (author)  steveastrouk5 years ago
Im a newbie with the Arduino so pretty much what I have read in "Getting started with Arduino" none of which is useful for the QTI and a google search has only turned up how to hook it up
I would appreciate any Help I can get
Connect the QTI to one of the Arduino's analogin pins. Use the Analogread command and a piece of code like this

This does nothing except stick the measured value into a variable for you - what you do with it is up to you.


int sensorPin = A0; // select the input pin for the potentiometer
int sensorValue = 0; // variable to store the value coming from the sensor

void setup() {}

void loop() {
// read the value from the sensor:
sensorValue = analogRead(sensorPin);

}
TheMONKEY (author)  steveastrouk5 years ago
Thank You very much Thats a big help
TheMONKEY (author)  steveastrouk5 years ago
All I need to do is get the Arduino to see a black line then turn on a LED when it does