1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-11-28 09:24:14 +01:00

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.
This commit is contained in:
Jordy 2019-07-25 20:04:34 +02:00 committed by Martino Facchin
parent cb69872e73
commit 88b462ea49

View File

@ -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) {