JoyStick Module For Sensor Shield Module Arduino

JoyStick Module For Sensor Shield Module Arduino 

More details

ARD0016
New product

3,93 €tax excl.

- +

Add to compare

 
More info

On the principle, the control rod can be considered that it is organized  by the two potentiometer and a button

Two of the input value of potentiometer are respectively to 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 the digital quantity. Therefore the control rod contain a total of three input interface which are used to connect X, Y, and Z

When using, it can connect with Arduino sensor shield,and connect Arduino corresponding pins through Arduino sensor cables. In the example below, the X axes and Y axes are respectively link to the analog input A1 and A0 ,and Z axis is connected to the digital I/O 7 pin.

The corresponding code shown below :

int sensorPin = 5;int value = 0;void setup() {  pinMode(7, OUTPUT);  Serial.begin(9600);}void loop() {  value = analogRead(0);  Serial.print("X:");  Serial.print(value, DEC);  value = analogRead(1);  Serial.print(" | Y:");  Serial.print(value, DEC);  value = digitalRead(7);  Serial.print(" | Z: ");  Serial.println(value, DEC);  delay(100);}Referring Sample Code :int JoyStick_X = 0; //xint JoyStick_Y = 1; //yint JoyStick_Z = 3; //keyvoid setup()  {   pinMode(JoyStick_X, INPUT);   pinMode(JoyStick_Y, INPUT);   pinMode(JoyStick_Z, INPUT);   Serial.begin(9600); // 9600 bps}void loop() {      int x,y,z;      x=analogRead(JoyStick_X);      y=analogRead(JoyStick_Y);      z=digitalRead(JoyStick_Z);      Serial.print(x ,DEC);      Serial.print(",");      Serial.print(y ,DEC);      Serial.print(",");      Serial.println(z ,DEC);      delay(100);}
 




Abbiamo disponibili datasheet di tutti i componenti, qualora non fosse presente nella scheda download del prodotto inviaci un messaggio dal modulo contattaci e lo pubblicheremo il prima possibile nel nostro sito.

1 other product in the same category:

Compare 0

No products

To be determined Shipping
0,00 € Total

Prices are tax excluded

Check out