Compatible with Arduino UNO Joystick Shield

Brand Name:Joystick Shield
Certification:CE Rohs FCC
Model Number:Joystick Shield
Minimum Order Quantity:5pcs
Delivery Time:3 days
Payment Terms:TT advance paypal
Contact Now

Add to Cart

Active Member
Location: Shenzhen Guangdong
Address: Room 620 ,yutian building , song lin road , Futian district ,Shenzhen , China
Supplier`s last login times: within 1 hours
Product Details Company Profile
Product Details

Compatible with Arduino UNO Joystick Shield


Description :

The shield sits on top of your Arduino and turns it into a simple controller. Five momentary push buttons (4+ joystick select button) and a two-axis thumb joystick gives your Arduino functionality on the level of old Nintendo controllers. Soldering is not required, and because this is already fully assembled item, so you can use it derectly !

The momentary push buttons are connected to Arduino digital pins 2-6; when pressed they will pull the pin low (utilizing the internal pull-ups of the Arduino). Vertical movement of the joystick will produce a proportional analog voltage on analog pin 0, likewise, horizontal movement of the joystick can be tracked on analog pin 1.

Features :

1,Compatible with Arduino UNO,Duemilanove and Arduino MEGA (No additonal arduino shield or wires required)

2,2 axis thumb joystick with push on joystick button(analog pin 0 controls vertical movement & analog pin 1 controls horizontal movement)

3,Joystick button and four 12mm momentary push button connect to digital pin 2-6(digital pin 2-6 will pull low when pressed the button)

4,built-in RESET button

Demo Sketch :

//Create variables for each button on the Joystick Shield to assign the pin numbers
char button0=3, button1=4, button2=5, button3=6;
char sel=2;

void setup(void)
{
pinMode(sel, INPUT); //Set the Joystick 'Select'button as an input
digitalWrite(sel, HIGH); //Enable the pull-up resistor on the select button

pinMode(button0, INPUT); //Set the Joystick button 0 as an input
digitalWrite(button0, HIGH); //Enable the pull-up resistor on button 0

pinMode(button1, INPUT); //Set the Joystick button 1 as an input
digitalWrite(button1, HIGH); //Enable the pull-up resistor on button 1

pinMode(button2, INPUT); //Set the Joystick button 2 as an input
digitalWrite(button2, HIGH); //Enable the pull-up resistor on button 2

pinMode(button3, INPUT); //Set the Joystick button 3 as an input
digitalWrite(button3, HIGH); //Enable the pull-up resistor on button 3

Serial.begin(9600); //Turn on the Serial Port at 9600 bps
}

void loop(void)
{
Serial.print(analogRead(0)); //Read the position of the joysticks X axis and print it on the serial port.
Serial.print(",");
Serial.print(analogRead(1)); //Read the position of the joysticks Y axis and print it on the serial port.
Serial.print(",");
Serial.print(digitalRead(sel)); //Read the value of the select button and print it on the serial port.
Serial.print(digitalRead(button0)); //Read the value of the button 0 and print it on the serial port.
Serial.print(digitalRead(button1)); //Read the value of the button 1 and print it on the serial port.
Serial.print(digitalRead(button2)); //Read the value of the button 2 and print it on the serial port.
Serial.println(digitalRead(button3)); //Read the value of the button 3 and print it on the serial port.

//Wait for 100 ms, then go back to the beginning of 'loop' and repeat.
delay(100);
}


China Compatible with Arduino UNO Joystick Shield supplier

Compatible with Arduino UNO Joystick Shield

Inquiry Cart 0