Devices & Components
USB Cable Type A Male to Micro Type B Male
Arduino Uno Rev3
Breadboard 100x50
LED (generic)
Resistor 10k ohm
Push Button
Breadboard Jumper Wire Pack (200mm&100mm)
Resistor 330 ohm
Hardware & Tools
Laptop
Software & Tools
Arduino IDE
Project description
Code
Arduino Spaceship Interface Control Code
cpp
1int switchState = 0; 2 3void setup() { 4 5 pinMode(2, INPUT); // push button 6 pinMode(3, OUTPUT); // green LED 7 pinMode(4, OUTPUT); // red LED 1 8 pinMode(5, OUTPUT); // red LED 2 9 10} 11 12void loop() { 13 14 switchState = digitalRead(2); 15 16 if (switchState == LOW) { 17 18 digitalWrite(3, HIGH); 19 digitalWrite(4, LOW); 20 digitalWrite(5, LOW); 21 22 } else { 23 24 digitalWrite(3, LOW); 25 digitalWrite(4, LOW); 26 digitalWrite(5, HIGH); 27 28 delay(250); 29 30 digitalWrite(4, HIGH); 31 digitalWrite(5, LOW); 32 33 delay(250); 34 35 } 36 37}
Downloadable files
Spaceship Interface Circuit Schematic
Spaceship Interface Circuit Schematic_bb.pdf
Documentation
Spaceship Interface Prototype – Documentation
Arduino Project - Rexhep Mustafovski .pdf
Comments
Only logged in users can leave comments