const int pinKey = 2;
const int pinLed = 10;
bool action = 0;
void setup() {
// put your setup code here, to run once:
pinMode(pinKey, INPUT);
pinMode(pinled, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
action = digitalRead(pinKey, INPUT);
digitalWrite(pinLed, action);
}