Hello I’m using the Photo Interrupter - GP1A57HRJ00F that I soldered to SparkFun Photo Interrupter Breakout Board - GP1A57HRJ00F.
When I connect the PWR, GND and SIG to my ESP-WROVER-KIT it heats up, one of the sensor even burned as I saw smoke coming out of it…
I connected :
-
PWR to the 5V pin of the board
-
GND to the GND pin of the board and
-
SIG to GPIO34 which is supposed to be an input.
I tried to verify if there was a short somewhere but I couldn’t find none. I tried with another sensor and it was the same happening. Is it possible the pin draws too much current from the SIG pin of the breakout board?
Here is the code:
int photoelectricPin = 34; // LED connected to digital pin 13
int val = 0; // variable to store the read value
void setup() {
Serial.begin(115200);
pinMode(photoelectricPin, INPUT); // sets the digital pin 13 as output
}
void loop() {
val = digitalRead(photoelectricPin); // read the input pin
printf("%i",val);
printf("\n\r");
delay(500);
}