Assertion: push button | /r/HasProperty | digitalread(button_pin
Facets:
Source sentences:
text: // Change pin number that the push button module is connected to here #define BUTTON_PIN 2 void setup() { pinMode(LED_BUILTIN, OUTPUT); // on-board LED, usually pin 13 pinMode(BUTTON_PIN, INPUT); // push button pin set to input } void loop() { if (digitalRead(BUTTON_PIN)) { // switch closed?