Skip to content
Description

BUTTON is a single button Unit. The button status can be detected by the input pin status,simply capture the high/low electrical level.

As shown in the figure below:

Output status:

This unit communicates with M5Core through GROVE B port.

Product Features

  • Program Platform: Arduino, UIFlow(Blockly, Python)
  • Two Lego-compatible holes

Kit includes

  • 1x BUTTON Unit
  • 1x Grove Cable
Learn

LEARN

Example

1. Arduino IDE

The code below is incomplete(just for usage). To get the complete code, please click here.

#include <M5Stack.h>  // declaration int cur_value = 0;  // initialization M5.begin();// init pinMode(36, INPUT);// BUTTON Pin  // read data cur_value = digitalRead(36);// read the value of BUTTON M5.update(); 

2. UIFlow

If you want the complete code, please click here.

 

More information

Schematic

PinMap

M5Core(GROVE B)Btn (GPIO36)NC (GPIO26)5VGNDBUTTON UnitBUTTON Pin/5VGND

 


The Mini Button Unit appears in the following collections:

SKU M5-U027