En la primera práctica hemos conseguido que los led luzcan correctamente y que al pulsar un pulsador parpadeen los led amarillo y rojo. El código correspondiente es: /* Arduino Starter Kit example Project 2 - Spaceship Interface This sketch is written to accompany Project 2 in the Arduino Starter Kit Parts required: 1 green LED 2 red LEDs pushbutton 10 kilohm resistor 3 220 ohm resistors Created 13 September 2012 by Scott Fitzgerald http://arduino.cc/starterKit This example code is part of the public domain */ // Create a global variable to hold the // state of the switch. This variable is persistent // throughout the program. Whenever you refer to // switchState, you’re talking about the number it holds int switchstate = 0; void setup(){ // declare the LED pins as outputs pinMode(3,OUTPUT); pinMode(4,OUTPUT); pinMode(5,OUTPUT); // declare the switch pin as an input pinMode(2,INPUT); } void loop(){ // read the value of the s...