1074Views7Replies

Author Options:

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

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

7 Replies

user
steveastroukBest Answer (author)2011-12-27

As always, show your circuits.

Steve

Select as Best AnswerUndo Best Answer

user
TheMONKEY (author)steveastrouk2011-12-27

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

Select as Best AnswerUndo Best Answer

user
steveastrouk (author)TheMONKEY2011-12-27

OK, what code have you tried ?

Select as Best AnswerUndo Best Answer

user
TheMONKEY (author)steveastrouk2011-12-27

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

Select as Best AnswerUndo Best Answer

user
steveastrouk (author)TheMONKEY2011-12-28

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);

}

Select as Best AnswerUndo Best Answer

user
TheMONKEY (author)steveastrouk2011-12-28

Thank You very much Thats a big help

Select as Best AnswerUndo Best Answer

user
TheMONKEY (author)steveastrouk2011-12-27

All I need to do is get the Arduino to see a black line then turn on a LED when it does

Select as Best AnswerUndo Best Answer