// Mayra Ascencio Calderón // Fab Academy // Code const int sensor = 10; const int led1 = 8; const int motor = 2; int sl; const int pinservo1=1; void setup() { pinMode (sensor, INPUT); pinMode (led1, OUTPUT); pinMode (motor, OUTPUT); } void loop() { sl= digitalRead(sensor); if (sl==1) {digitalWrite (led1,HIGH); digitalWrite (motor,HIGH); } else { digitalWrite(led1,LOW); digitalWrite(motor,LOW); } delay(20); }