Difference between revisions of "AnalogKey()"

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

Latest revision as of 09:41, 18 September 2017



AnalogKey is used to create an instance of the object AnalogKey, which is used to detect analog sensors and receives signal between the minimum and maximum, and its name will be used in the code.
When creating a library, you need to call #include <Microduino_Key.h> head file.


  • PIN: set sensors interface pins.


  • Create an analog switch instance
#include <Microduino_Key.h>

AnalogKey keyDigital(A0); //Create an analog switch instance, named keyDigital and connect it to pin A0

void setup() {


void loop() {