DigitalKey()

From Microduino Wiki
Jump to: navigation, search

DigitalKey(PIN)


Description

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

Parameters

  • PIN: set sensors port pins

Sample

  • 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() {

}


Others