ESP32 DEVKITV1, pins 36 (HALL VP) and 39 (HALL VN)

Dremkin
Posts: 1
Joined: Mon Jun 13, 2022 6:11 pm

ESP32 DEVKITV1, pins 36 (HALL VP) and 39 (HALL VN)

Postby Dremkin » Mon Jun 13, 2022 6:30 pm

I'm trying to use these two contacts for simple input. Pull-up resistor 1k. As a result, it turns out that these two contacts are interconnected - if pin 36 is connected to ground, then pin 39 is also connected to ground..

Can these pins be used as two separate inputs?

Code: Untitled.c Select all



int pinTest1 = 36;
int pinTest2 = 39;

void setup() {
Serial.begin(9600);

pinMode(pinTest1, INPUT_PULLUP);
pinMode(pinTest2, INPUT_PULLUP);

}

byte lastState1 = 0;
byte lastState2 = 0;

void loop() {

byte statePin1 = digitalRead(pinTest1);
if(lastState1 != statePin1){
Serial.print(" Pin "); Serial.print(pinTest1); Serial.print(" = "); Serial.println(statePin1);
if(statePin1 == HIGH) Serial.println();
lastState1 = statePin1;
}

byte statePin2 = digitalRead(pinTest2);
if(lastState2 != statePin2){
Serial.print(" Pin "); Serial.print(pinTest2); Serial.print(" = "); Serial.println(statePin2);
if(statePin2 == HIGH) Serial.println();
lastState2 = statePin2;
}

}

Who is online

Users browsing this forum: PerplexityBot and 4 guests