QTR-1RC Sensor Orangutan Programming

I have a Orangutan SV-328 and i’m trying to use the PD0 and PD1 to read two QTR-1RC sensors.
The problem i have is that it works for PD0 but not for PD1…on PD1 it gives me around 45 or so(constant)…
I’m wondering what pin is PD1 on or what am i doing wrong.
Thank you in advance for your help :slight_smile:

    unsigned char qtr_rc_pins[] = {1, 0}; 
	int QRCPos [] ={0,0}; 
	qtr_rc_init(qtr_rc_pins, 2, 2000, 255);


		qtr_read(QRCPos, QTR_EMITTERS_ON);

		S1 = analog_read(0); // -1
		S2 = analog_read(1); //  2
		S3 = analog_read(2); // -2
		S4 = analog_read(3); //  0
		S5 = analog_read(4); //  1
		S6 = QRCPos[0];      // +3
		S7 = QRCPos[1];	     // -3



PD1 has an LED on it.

- Jan

And know the question is:
I have 5 analog sensors…that means i have one more port free…how can i use PC5 to read the QRC and still be capabale to read all the analog sensors?


The Orangutan SV has six analog inputs: PC0 - PC5. You can use PC0 - PC4 for your analog sensors and PD0 and PC5 for your QTR-1RC sensors, or you can cut the trace to (or desolder) the red user LED on pin PD1.

- Ben

Ok. Thank you very much for your reply.
One last question and i’m done.
What pin number i should put when i define the pins so i can read from PC5? :slight_smile:
Thank you!

From the QTR section of the Pololu AVR library command reference:

So you would use pins 0 and 19 for PD0 and PC5, respectively.

- Ben