Arduino Joy Stick module
Here is a simple Example of using the Joy Stick module with button. Circuit Diagram Source Code // Arduino pin numbers const int SW_pin = 2; // digital pin 2 connected to switch output const int X_pin = 0; // analog pin 0 connected to X output const int Y_pin = 1; // analog pin 1connected to Y output const int Xmin = 8; // left - digital pin 8 const int Ymax = 9; // right - digital pin 9 const int Ymin = 10; // down - digital pin 10 const int Xmax = 11; // up - digital pin 11 int Y; int X; int SW; void setup() { pinMode(SW_pin, INPUT); pinMode(Xmin, OUTPUT); pinMode(Xmax, OUTPUT); pinMode(Ymin, OUTPUT); pinMode(Ymax, OUTPUT); digitalWrite(SW_pin, HIGH); Serial.begin(115200); } void loop() { Serial.print("Switch: "); Serial.print(digitalRead(SW_pin)); Serial.print("\n"); Serial.print("X-axis: "); Serial.print(analogRead(X_pin)); Serial.print("\n"); Serial.print("Y-axis: &qu