Electronic Components Datasheet Search
  English  ▼
ALLDATASHEET.COM

X  

DEV-09760 Datasheet(PDF) 5 Page - SparkFun Electronics

Part # DEV-09760
Description  Joystick Shield Quickstart Guide
Download  9 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  SPARKFUN [SparkFun Electronics]
Direct Link  https://www.sparkfun.com/
Logo SPARKFUN - SparkFun Electronics

DEV-09760 Datasheet(HTML) 5 Page - SparkFun Electronics

  DEV-09760 Datasheet HTML 1Page - SparkFun Electronics DEV-09760 Datasheet HTML 2Page - SparkFun Electronics DEV-09760 Datasheet HTML 3Page - SparkFun Electronics DEV-09760 Datasheet HTML 4Page - SparkFun Electronics DEV-09760 Datasheet HTML 5Page - SparkFun Electronics DEV-09760 Datasheet HTML 6Page - SparkFun Electronics DEV-09760 Datasheet HTML 7Page - SparkFun Electronics DEV-09760 Datasheet HTML 8Page - SparkFun Electronics DEV-09760 Datasheet HTML 9Page - SparkFun Electronics  
Zoom Inzoom in Zoom Outzoom out
 5 / 9 page
background image
const byte PIN_ANALOG_X = 0;
const byte PIN_ANALOG_Y = 1;
const int X_THRESHOLD_LOW = 505;
const int X_THRESHOLD_HIGH = 515;
const int Y_THRESHOLD_LOW = 500;
const int Y_THRESHOLD_HIGH = 510;
int x_position;
int y_position;
int x_direction;
int y_direction;
void setup() {
Serial.begin(9600);
}
void loop () {
x_direction = 0;
y_direction = 0;
x_position = analogRead(PIN_ANALOG_X);
y_position = analogRead(PIN_ANALOG_Y);
if (x_position > X_THRESHOLD_HIGH) {
x_direction = 1;
} else if (x_position < X_THRESHOLD_LOW) {
x_direction = ­1;
}
if (y_position > Y_THRESHOLD_HIGH) {
y_direction = 1;
} else if (y_position < Y_THRESHOLD_LOW) {
y_direction = ­1;
}
if (x_direction == ­1) {
if (y_direction == ­1) {
Serial.println("left­down");
} else if (y_direction == 0) {
Serial.println("left");
} else {
// y_direction == 1
Serial.println("left­up");
}
} else if (x_direction == 0) {
if (y_direction == ­1) {
Serial.println("down");
} else if (y_direction == 0) {
Serial.println("centered");
} else {
// y_direction == 1
Serial.println("up");
}
} else {
// x_direction == 1
if (y_direction == ­1) {
Serial.println("right­down");
} else if (y_direction == 0) {
Serial.println("right");
Page 5 of 9


Similar Part No. - DEV-09760

ManufacturerPart #DatasheetDescription
logo
SparkFun Electronics
DEV-09716 SPARKFUN-DEV-09716 Datasheet
660Kb / 2P
   SparkFun FTDI Basic Breakout - 5V
6/24/2015
More results

Similar Description - DEV-09760

ManufacturerPart #DatasheetDescription
logo
SparkFun Electronics
ADXL345 SPARKFUN-ADXL345 Datasheet
205Kb / 7P
   ADXL345 Quickstart Guide
2/12/2015
DEV-07914 SPARKFUN-DEV-07914 Datasheet
467Kb / 9P
   ProtoShield Quickstart Guide
WRL-13287 SPARKFUN-WRL-13287 Datasheet
822Kb / 15P
   WiFi Shield Hookup Guide
logo
Silicon Laboratories
SLSTK3401A SILABS-SLSTK3401A Datasheet
522Kb / 7P
   EFM32 Pearl Gecko Family QSG118: EFM32PG1 SLSTK3401A QuickStart Guide
Rev. 0.4
logo
SparkFun Electronics
CEL-13120 SPARKFUN-CEL-13120 Datasheet
914Kb / 22P
   Cellular Shield Hookup Guide
DEV-13628 SPARKFUN-DEV-13628 Datasheet
370Kb / 12P
   Photon OLED Shield Hookup Guide
DEV-13626 SPARKFUN-DEV-13626 Datasheet
869Kb / 13P
   Photon Battery Shield Hookup Guide
logo
Cypress Semiconductor
CY8CKIT-024 CYPRESS-CY8CKIT-024 Datasheet
1Mb / 29P
   CapSense짰 Proximity Shield Kit Guide
Rev. *B
logo
SparkFun Electronics
DEV-13262 SPARKFUN-DEV-13262 Datasheet
505Kb / 8P
   CAN-Bus Shield Hookup Guide
DEV-13956 SPARKFUN-DEV-13956 Datasheet
1Mb / 26P
   Arduino Weather Shield Hookup Guide V12
3/6/2017
More results


Html Pages

1 2 3 4 5 6 7 8 9


Datasheet Download

Go To PDF Page


Link URL




Privacy Policy
ALLDATASHEET.COM
Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Datasheet Upload   |   Contact us   |   Privacy Policy   |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com