Skip to content

Commit 3bf6eb5

Browse files
authored
Create joystick.ino
1 parent 223d3be commit 3bf6eb5

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

joystick.ino

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
//connect your joystick JRX to pin A5
2+
//and JRY to A4
3+
4+
void setup() {
5+
Serial.begin(9600);
6+
}
7+
void loop() {
8+
int x = analogRead(A4);
9+
int y = analogRead(A5);
10+
Serial.print('x');
11+
Serial.println(x);
12+
Serial.print('y');
13+
Serial.println(y);
14+
}

0 commit comments

Comments
 (0)