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
#define x_axis A0 | |
#define y_axis A1 | |
int x; | |
int y; | |
void setup() { | |
pinMode(x_axis,INPUT); | |
pinMode(y_axis,INPUT); | |
Serial.begin(9600); | |
} | |
void loop() { | |
x=analogRead(x_axis); | |
y=analogRead(y_axis); | |
Serial.println(x); | |
} |