ContentsIndex
Example
digitalRead
#define LED     13
#define BUTTON  8
void setup()
{
    pinMode(LED, OUTPUT);
    pinMode(BUTTON, INPUT);
}
void loop()
{
    int n= digitalRead(BUTTON);
    if (n == HIGH)
    {
        digitalWrite(LED, LOW);
    }
    else
    {
        digitalWrite(LED, HIGH);
    }
    delay(2000);
}