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?
  1.  
  2. int pinTest1 = 36;
  3. int pinTest2 = 39;
  4.  
  5. void setup() {
  6.   Serial.begin(9600);
  7.  
  8.   pinMode(pinTest1, INPUT_PULLUP);
  9.   pinMode(pinTest2, INPUT_PULLUP);
  10.  
  11. }
  12.  
  13. byte lastState1 = 0;
  14. byte lastState2 = 0;
  15.  
  16. void loop() {
  17.  
  18.   byte statePin1 = digitalRead(pinTest1);
  19.   if(lastState1 != statePin1){
  20.     Serial.print(" Pin "); Serial.print(pinTest1); Serial.print(" = "); Serial.println(statePin1);
  21.     if(statePin1 == HIGH) Serial.println();
  22.     lastState1 = statePin1;
  23.   }
  24.  
  25.   byte statePin2 = digitalRead(pinTest2);
  26.   if(lastState2 != statePin2){
  27.     Serial.print(" Pin "); Serial.print(pinTest2); Serial.print(" = "); Serial.println(statePin2);
  28.     if(statePin2 == HIGH) Serial.println();
  29.     lastState2 = statePin2;
  30.   }
  31.  
  32. }

Who is online

Users browsing this forum: No registered users and 85 guests