Page 1 of 1

query buttonState of boot button

Posted: Tue Sep 19, 2017 1:13 pm
by mattismyo
How can i query the buttonstate of the boot button? I want to use the boot button to call a function. Like

Code: Select all

buttonState = digitalRead(boot_button);
  if (buttonState == HIGH) {
    //do something
  }

Re: query buttonState of boot button

Posted: Wed Sep 20, 2017 1:49 am
by ESP_Angus
Given this question seems to be about Arduino, I've moved it to the Arduino subforum.

The button labelled "Boot" on most development boards is GPIO0, so you can read its state from an Arduino sketch with digitalRead(0).