Answers for "arduino joystick"

0

arduino joystick

//joystick test
//arduino joystick
#define joyX A0
#define joyY A1
 
 
void setup() {
  Serial.begin(9600);
}
 
void loop() {
  // put your main code here, to run repeatedly:
int xValue = analogRead(joyX);
int yValue = analogRead(joyY);
 
  //print the values with to plot or view
  Serial.print(xValue);
  Serial.print("t");
  Serial.println(yValue);
}
Posted by: Guest on February-03-2022

Browse Popular Code Answers by Language