int ledpin =7;
int bottom = 10;
void setup() {
// put your setup code here, to run once:
pinMode(ledpin,OUTPUT);
pinMode(bottom,INPUT);
}
void loop() {
// put your main code here, to run repeatedly:
if(digitalRead(bottom) == HIGH){
digitalWrite(ledpin,HIGH);
}else{
digitalWrite(ledpin,LOW);
}
}