Joystick Programming in Arduino
Video Link
https://youtu.be/tPgzNT4k9WQ
Joystick
CODE
--------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------
void setup() {
Serial.begin(9600);
}
void loop() {
// read the input on analog pin 0:
int xAxis = analogRead(A0);
int yAxis = analogRead(A1);
// print out the value you read:
Serial.println(xAxis);
Serial.println(yAxis);
delay(100); // delay in between reads for stability
}
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
Video Link
https://youtu.be/tPgzNT4k9WQ
Joystick
CODE
--------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------
void setup() {
Serial.begin(9600);
}
void loop() {
// read the input on analog pin 0:
int xAxis = analogRead(A0);
int yAxis = analogRead(A1);
// print out the value you read:
Serial.println(xAxis);
Serial.println(yAxis);
delay(100); // delay in between reads for stability
}
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
No comments:
Post a Comment