Skip to content

Instantly share code, notes, and snippets.

@semyonf
Created December 26, 2018 13:51
Show Gist options
  • Save semyonf/9f51963f9474ec764e9bb82a126ecb30 to your computer and use it in GitHub Desktop.
Save semyonf/9f51963f9474ec764e9bb82a126ecb30 to your computer and use it in GitHub Desktop.
курсач Ивану
#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