Hi
As i searched a lot this information, i share here my wiring cables between esp32 devkit and QTR-08RC
QTR | Gpio Esp32 |
---|---|
1 | 12 |
3 | 14 |
5 | 4 |
7 | 16 |
9 | 17 |
11 | 5 |
13 | 18 |
15 | 19 |
VCC | 5.5v |
GND | GND |
What i did not undestand is the CTRL pin : it seems that it does not have effect on IR led (canāt see them through camera although i can see other remote controlsā¦)
If anyone can share this info, could be great
I also put a led on Gpio13 (i do not have a builtin led) to see when calibrating is starting and finishing
The example code is slightly modified as below:
#include <QTRSensors.h>
QTRSensors qtr;
const uint8_t SensorCount = 8;
uint16_t sensorValues[SensorCount];void setup()
{
// configure the sensors
qtr.setTypeRC();
qtr.setSensorPins((const uint8_t){12, 14, 4, 16, 17, 5, 18, 19}, SensorCount);
qtr.setEmitterPin(0);Serial.begin(115200);
}void loop()
{
// read raw sensor values
qtr.read(sensorValues);// print the sensor values as numbers from 0 to 2500, where 0 means maximum
// reflectance and 2500 means minimum reflectance
for (uint8_t i = 0; i < SensorCount; i++)
{
Serial.print(sensorValues[i]);
Serial.print(ā\tā);
}
Serial.println();delay(250);
}