Arduino Joystick for sensor shield

  • Units in Stock: 221
  • Date Added: Sunday 07 February, 2010
Add to Cart:

Product Description:

On the principle, the control rod can be considered as organized by the two potentiometer and a button :

Two of the input values of potentiometer respectively show the user offset in the X and Y axis, and the type of offset is analog. The button is used to show whether the user push down button in the Z axis, its type is digital. Therefore the control rod contain a total of three input interface which are used to connect X, Y, and Z:

You can use it together with Arduino Sensor Sheild. Connect it to Arduino via corresponding pin link. In the example below, the X and Y axes is connected to and analog input A1 and A0 , and Z axis is connected to the digital I/O 7 foot:

The corresponding code shown below:

int sensorPin = 5;
int value = 0;

void setup() {
  pinMode(7, OUTPUT);

void loop() {
  value = analogRead(0);
  Serial.print(value, DEC);

  value = analogRead(1);
  Serial.print(" | Y:");
  Serial.print(value, DEC);

  value = digitalRead(7);
  Serial.print(" | Z: ");
  Serial.println(value, DEC);


Qty Discounts Off Price
Copyright © 2018 Elechouse.
Powered by ELECHOUSE