Created
November 28, 2018 22:38
-
-
Save thejevans/fc4289281cb17fdd4ae7156cbb516f81 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
//// init | |
//int pin1A = 11; | |
//int pin2A = 10; | |
//int duty = 25; | |
// | |
//void setup() { | |
// // put your setup code here, to run once: | |
// Serial.begin(9600); | |
// pinMode(pin1A, OUTPUT); | |
// pinMode(pin2A, OUTPUT); | |
//} | |
// | |
//void loop() { | |
// // put your main code here, to run repeatedly: | |
// digitalWrite(pin1A, HIGH); | |
// while(true) { | |
// digitalWrite(pin2A, HIGH); | |
// Serial.println("high"); | |
// delay(duty); | |
// digitalWrite(pin2A, LOW); | |
// Serial.println("low"); | |
// delay(100 - duty); | |
// } | |
//} | |
// init | |
int blue = 11; | |
int yellow = 10; | |
int pink = 6; | |
int orange = 5; | |
int delayTime = 2; | |
void setup() { | |
// put your setup code here, to run once: | |
Serial.begin(9600); | |
pinMode(blue, OUTPUT); | |
pinMode(yellow, OUTPUT); | |
pinMode(pink, OUTPUT); | |
pinMode(orange, OUTPUT); | |
} | |
void loop() { | |
// put your main code here, to run repeatedly: | |
digitalWrite(orange, HIGH); | |
digitalWrite(pink, LOW); | |
delay(delayTime); | |
digitalWrite(yellow, HIGH); | |
digitalWrite(blue, LOW); | |
delay(delayTime); | |
digitalWrite(orange, LOW); | |
digitalWrite(pink, HIGH); | |
delay(delayTime); | |
digitalWrite(yellow, LOW); | |
digitalWrite(blue, HIGH); | |
delay(delayTime); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment