query buttonState of boot button

mattismyo
Posts: 29
Joined: Sat Jun 10, 2017 6:56 am

query buttonState of boot button

Postby mattismyo » Tue Sep 19, 2017 1:13 pm

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
  }

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: query buttonState of boot button

Postby ESP_Angus » Wed Sep 20, 2017 1:49 am

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).

Who is online

Users browsing this forum: No registered users and 134 guests