Difference between revisions of "DigitalKey()"

From Microduino Wiki
Jump to: navigation, search
(Created page with "{| style="width: 800px;" |- | <p style="color: #666666;font-size:220%">'''DigitalKey(PIN)'''</p> <br> <p style="color: #E87E05;font-size:135%">Description</p> DigitalKey is us...")
(No difference)

Latest revision as of 09:36, 18 September 2017



DigitalKey is used to create an instance of the object DigitalKey which is used to detect digital signal sensors and only accept signal “1” and “0” and its name will be used in the code.
When creating a library, you need to call #include <Microduino_Key.h>.


  • PIN: set sensors port pins


  • Create a digital switch object
#include <Microduino_Key.h>

DigitalKey keyDigital(A0); //Create a digital switch instance, named keyDigital and connect it to pin A0

void setup() {

void loop() {