Created
December 26, 2018 13:51
-
-
Save semyonf/9f51963f9474ec764e9bb82a126ecb30 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
#define BLUE 6 | |
#define GREEN 5 | |
void setup() | |
{ | |
pinMode(A0, INPUT); | |
pinMode(A1, INPUT); | |
pinMode(BLUE, OUTPUT); | |
pinMode(GREEN, OUTPUT); | |
} | |
void loop() | |
{ | |
int ox = analogRead(A0); | |
int oy = analogRead(A1); | |
digitalWrite(BLUE, HIGH); | |
delayMicroseconds(ox); | |
digitalWrite(BLUE, LOW); | |
digitalWrite(GREEN, HIGH); | |
delayMicroseconds(oy); | |
digitalWrite(GREEN, LOW); | |
delayMicroseconds(1000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment