DigitalKey()

From Microduino Wiki
Revision as of 09:36, 18 September 2017 by Fengfeng (talk | contribs) (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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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