Last active
February 20, 2020 01:27
-
-
Save zekrom-vale/c5138de853092617c8e0ac7d55b9bd84 to your computer and use it in GitHub Desktop.
Arduino signal generator, creates 00, 01, 10, 11
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
int pin1=2; | |
int pin2=3; | |
int del=2000; | |
void setup() { | |
// put your setup code here, to run once: | |
pinMode(pin1, OUTPUT); | |
pinMode(pin2, OUTPUT); | |
} | |
void loop() { | |
// put your main code here, to run repeatedly: | |
digitalWrite(pin1, LOW); | |
digitalWrite(pin2, LOW); | |
delay(del); | |
digitalWrite(pin1, LOW); | |
digitalWrite(pin2, HIGH); | |
delay(del); | |
digitalWrite(pin1, HIGH); | |
digitalWrite(pin2, LOW); | |
delay(del); | |
digitalWrite(pin1, HIGH); | |
digitalWrite(pin2, HIGH); | |
delay(del); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment