This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Angi noen variabler vi skal bruke senere | |
int numBlinks; | |
int i; | |
void setup(void) { | |
// Start serial og angi hastighet | |
Serial.begin(9600); | |
// Angi hvilken pinne på Arduinoen som vi har koble LED til |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const int pingPin = 7; | |
void setup() { | |
Serial.begin(9600); | |
pinMode(2, OUTPUT); // Led red | |
pinMode(3, OUTPUT); // Led orange | |
pinMode(4, OUTPUT); // Led green | |
} | |
void loop() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void setup(){ | |
Serial.begin(9600); | |
for (int leds = 10; leds < 14; leds++) { | |
pinMode(leds, OUTPUT); | |
} | |
} | |
void loop (){ | |
if (Serial.available()) { |