Xinyuan-LilyGO / TTGO-T-Display

MIT License
1.05k stars 337 forks source link

GPIOs dont work as generic #10

Open arcbtc opened 5 years ago

arcbtc commented 5 years ago

Using 38-27 for a 4x4 keypad, but they dont seem to work as generic ESP32 GPIOS Using "Keypad" library Same code works fine with DEVKIT V1 and NODEMCU 32S

const byte rows = 4; //four rows
const byte cols = 3; //three columns
char keys[rows][cols] = {
  {'1','2','3'},
  {'4','5','6'},
  {'7','8','9'},
  {'*','0','#'}
};
byte rowPins[rows] = {27, 26, 25, 33}; //connect to the row pinouts of the keypad
byte colPins[cols] = {32, 39, 38}; //connect to the column pinouts of the keypad
Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, rows, cols );
arcbtc commented 5 years ago

Pin 38, 39 seem to be the issue

lewisxhe commented 5 years ago

@arcbtc 38,39 can only be configured as an input. If you confirm that it is pressed by detecting low level, please use a pull-up resistor to pull the PIN high externally.

billmetz commented 4 years ago

From the IO_MUX table of the ESP32 Datasheet (V3.3), GPIO34 to GPIO39 are input only. Perhaps it would be helpful to update TTGO-pinmap.jpg as : TTGO-pinmap-editted

tadam777 commented 3 years ago

You're right pins GPIO34 to GPIO39 are input only. pinout

Link to the ESP32 datasheet

xpix commented 3 years ago

Well, what to say about it. A PCB design for the garbage can ... thanks for the tip to all.

yngndrw commented 3 years ago

I've just fallen into this trap as well, like you I now have a load of useless PCBs.

It's clearly labeled as GPIO on the pinout so I'm very annoyed by it.

stevempotter commented 2 years ago

You can unsolder a couple of tiny caps on the underside to get those GPIOs back. (C49, C32)