mirror of
https://github.com/meshtastic/firmware.git
synced 2025-05-02 12:03:56 +00:00
#697 GPIO 12 is an odd pin.
This commit is contained in:
parent
c690f81574
commit
e4141df0e9
@ -354,15 +354,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#define VEXT_ENABLE 21 // active low, powers the oled display and the lora antenna boost
|
#define VEXT_ENABLE 21 // active low, powers the oled display and the lora antenna boost
|
||||||
#define LED_PIN 25 // If defined we will blink this LED
|
#define LED_PIN 25 // If defined we will blink this LED
|
||||||
#define BUTTON_PIN \
|
#define BUTTON_PIN 12 // If defined, this will be used for user button presses,
|
||||||
12 // If defined, this will be used for user button presses, if your board doesn't have a physical switch, you can wire one
|
|
||||||
// between this pin and ground
|
|
||||||
|
|
||||||
/* Don't enable the internal pull up on the TLORA_V2_1_16. GPIO 12 is connected to a bidirectional
|
#define BUTTON_NEED_PULLUP
|
||||||
diode. If someone needs to use a button, they should connect an external pull up that's stronger
|
|
||||||
than what's built into the esp32
|
|
||||||
*/
|
|
||||||
// #define BUTTON_NEED_PULLUP
|
|
||||||
|
|
||||||
#define USE_RF95
|
#define USE_RF95
|
||||||
#define LORA_DIO0 26 // a No connect on the SX1262 module
|
#define LORA_DIO0 26 // a No connect on the SX1262 module
|
||||||
@ -387,8 +381,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define I2C_SCL 2
|
#define I2C_SCL 2
|
||||||
|
|
||||||
#define LED_PIN 12 // If defined we will blink this LED
|
#define LED_PIN 12 // If defined we will blink this LED
|
||||||
//#define BUTTON_PIN 36 // If defined, this will be used for user button presses (ToDo problem on that line on debug screen --> Long press start!)
|
//#define BUTTON_PIN 36 // If defined, this will be used for user button presses (ToDo problem on that line on debug screen -->
|
||||||
//#define BUTTON_NEED_PULLUP //GPIOs 34 to 39 are GPIs – input only pins. These pins don’t have internal pull-ups or pull-down resistors.
|
//Long press start!) #define BUTTON_NEED_PULLUP //GPIOs 34 to 39 are GPIs – input only pins. These pins don’t have internal
|
||||||
|
//pull-ups or pull-down resistors.
|
||||||
|
|
||||||
#define USE_RF95
|
#define USE_RF95
|
||||||
#define LORA_DIO0 38 // a No connect on the SX1262 module
|
#define LORA_DIO0 38 // a No connect on the SX1262 module
|
||||||
|
@ -305,12 +305,15 @@ void setup()
|
|||||||
|
|
||||||
#ifdef BUTTON_PIN
|
#ifdef BUTTON_PIN
|
||||||
#ifndef NO_ESP32
|
#ifndef NO_ESP32
|
||||||
// If BUTTON_PIN is held down during the startup process,
|
|
||||||
// force the device to go into a SoftAP mode.
|
|
||||||
bool forceSoftAP = 0;
|
bool forceSoftAP = 0;
|
||||||
|
|
||||||
|
// If the button is connected to GPIO 12, don't enable the ability to use
|
||||||
|
// meshtasticAdmin on the device.
|
||||||
pinMode(BUTTON_PIN, INPUT);
|
pinMode(BUTTON_PIN, INPUT);
|
||||||
|
|
||||||
#ifdef BUTTON_NEED_PULLUP
|
#ifdef BUTTON_NEED_PULLUP
|
||||||
gpio_pullup_en((gpio_num_t)BUTTON_PIN);
|
gpio_pullup_en((gpio_num_t)BUTTON_PIN);
|
||||||
|
delay(10);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// BUTTON_PIN is pulled high by a 12k resistor.
|
// BUTTON_PIN is pulled high by a 12k resistor.
|
||||||
|
Loading…
Reference in New Issue
Block a user