Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/arduino/Arduino.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordy <33688327+jordy-u@users.noreply.github.com>2019-07-25 21:04:34 +0300
committerMartino Facchin <m.facchin@arduino.cc>2020-04-07 15:09:07 +0300
commit88b462ea49772c317909f01b534f2c9ac9c4d10d (patch)
treef35adfd3ffee7e41f37a1c56a13ae2581ce3f8e6
parentcb69872e73191c28c77984be597d6bb8e728d724 (diff)
Replace hardcoded pin numbers with variableside-1.9.x-beta
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.
-rw-r--r--build/shared/examples/09.USB/Mouse/JoystickMouseControl/JoystickMouseControl.ino4
1 files changed, 2 insertions, 2 deletions
diff --git a/build/shared/examples/09.USB/Mouse/JoystickMouseControl/JoystickMouseControl.ino b/build/shared/examples/09.USB/Mouse/JoystickMouseControl/JoystickMouseControl.ino
index aa608f870..87164e7d2 100644
--- a/build/shared/examples/09.USB/Mouse/JoystickMouseControl/JoystickMouseControl.ino
+++ b/build/shared/examples/09.USB/Mouse/JoystickMouseControl/JoystickMouseControl.ino
@@ -69,8 +69,8 @@ void loop() {
lastSwitchState = switchState;
// read and scale the two axes:
- int xReading = readAxis(A0);
- int yReading = readAxis(A1);
+ int xReading = readAxis(xAxis);
+ int yReading = readAxis(yAxis);
// if the mouse control state is active, move the mouse:
if (mouseIsActive) {