Shop OBEX P1 Docs P2 Docs Learn Events
QTI — Parallax Forums

QTI

nihalnihal Posts: 8
edited 2012-06-18 12:15 in Accessories
Hi

I have problem in QTI Line Following,i use boe-bot and BS2,i use pins 12,13,14,15
but my test code does't work..........

QTI TEST (2).bs2



waiting for reply

nihal

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2012-06-18 09:26
    Have you tried the test code in the QTI sensor documentation? The QTI sensor is really an analog sensor and your test code doesn't take that into account. Also, keep in mind that the 3 wire connection to the sensor is different from most other sensors. The white wire goes to +5V and the red wire goes to the Stamp I/O pin. As noted in the documentation, normally the +5V supply is provided by another I/O pin. This is done so that only one QTI sensor's light source is on at a time. Otherwise, you might get light spillover from one sensor to another.
  • nihalnihal Posts: 8
    edited 2012-06-18 10:11

    Thanks mr:mike green for reply

    but my problem is ......the documentation use pin 4,5,6,7 when i change other pin like 12,13,14,15the sensor don't work
    "i mean that the sensor work just on the pins used in documentation"


    .....................My attachment code is the same code in documentation............
    but just change the OUTB,DIRB,INB to OUTD,DIRD,IND
  • Mike GreenMike Green Posts: 23,101
    edited 2012-06-18 10:36
    We were looking at different documentation. This is the documentation for the QTI sensor itself which I was referring to. You were using the AppKit with its sample code. I see what you mean about changing OUT/DIR/IN B to D. Remember that I/O pins 12-15 are also connected to the servo sockets. If you have anything plugged in there, that will conflict with your use of them with the QTI sensors. Make sure you have your wiring correct. There is no fundamental reason why using I/O pins 12-15 should be any different from using I/O pins 4-7 as long as you're not using the servo sockets.
  • nihalnihal Posts: 8
    edited 2012-06-18 11:05
    I am trying agin now it working when i pulg sensors directly in the board of Education not in X4 and X5 sockets which is also pin12-15 .............i don't know why??

    board1.jpg


    X4 and X5 Sockets is number 5 in the attached image
    699 x 534 - 134K
  • Mike GreenMike Green Posts: 23,101
    edited 2012-06-18 12:15
    The connections for the QTI sensors are different than the connections in the X4 and X5 sockets. In the X4 and X5 sockets, the red (R) wire is +5V (or Vin), the black wire (B) is Vss, and the white wire (W) is the I/O pin. This is the same as servo motors and things like the PING sensor, but the QTI sensor is different. That's why the documentation always shows QTI connections made using the breadboard area.
Sign In or Register to comment.