Skip to content

Firmware, GPIO 35 and GPIO 34 Have No Internal Pullup #347

@ForrestErickson

Description

@ForrestErickson

Describe the bug
A clear and concise description of what the bug is.
Short Summary of the expected behavior: The code should set GPIO input pins for INPUT_PULLUP only if there is an internal pull up on the ESP32

Short Summary of the buggy behavior:

In the Defin block for KRAKE is the following:

#if defined(KRAKE)

#define SWITCH_MUTE 35
// #define TONE_PIN 8
#define LIGHT0 12
#define LIGHT1 14
#define LIGHT2 27
#define LIGHT3 26
#define LIGHT4 25
#define LED_BUILTIN 13
#define SWITCH_ENCODER 34 // Center switch aka button Normaly high.

And in setup is:

// Setup GPIO pins, Mute and lights
pinMode(SWITCH_MUTE, INPUT_PULLUP); // The SWITCH_MUTE is different on Atmega vs ESP32. Is this redundant?
pinMode(SWITCH_ENCODER, INPUT_PULLUP); // The SWITCH_ENCODER is new to Krake. Is this redundant?

Lee discovered when trying to test the GPAD_API on an ESP32 Dev Kit1 that both the SWITCH_MUTE and SWITCH_ENCODER report being pressed.

For testing of GPAD_API with DEV Kit1 we will therefor need minimal hardware of pull up resistor on GPIO34 and 35.

Note the following is the full list of pins for which INPUT_PULLUP is not available
GPIO 34
GPIO 35
GPIO 36
GPIO 37
GPIO 38
GPIO 39

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions