Skip to content

Commit 7d851b4

Browse files
authored
Replace hardcoded pin numbers with variables
Replace pin numbers "A0" and "A1" with variables "xAxis" and "yAxis". Variables "xAxis" and "yAxis" were created, but never used. I changed the hardcoded pin numbers to these variables to avoid confusion and to make the code more consistent.
1 parent be5e01c commit 7d851b4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

build/shared/examples/09.USB/Mouse/JoystickMouseControl/JoystickMouseControl.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ void loop() {
6969
lastSwitchState = switchState;
7070

7171
// read and scale the two axes:
72-
int xReading = readAxis(A0);
73-
int yReading = readAxis(A1);
72+
int xReading = readAxis(xAxis);
73+
int yReading = readAxis(yAxis);
7474

7575
// if the mouse control state is active, move the mouse:
7676
if (mouseIsActive) {

0 commit comments

Comments
 (0)