( ! ) Deprecated: Function WP_Dependencies-&gt;add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers. in /var/www/html/wp-includes/functions.php on line 6131
Call Stack
#TimeMemoryFunctionLocation
10.0000484048{main}( ).../index.php:0
20.0000484400require( '/var/www/html/wp-blog-header.php ).../index.php:17
30.06074100984require_once( '/var/www/html/wp-includes/template-loader.php ).../wp-blog-header.php:19
40.06214129976include( '/var/www/html/wp-content/themes/twentyfifteen/single.php ).../template-loader.php:125
50.06214129976get_header( $name = ???, $args = ??? ).../single.php:10
60.06224130192locate_template( $template_names = [0 => 'header.php'], $load = TRUE, $load_once = TRUE, $args = [] ).../general-template.php:48
70.06224130288load_template( $_template_file = '/var/www/html/wp-content/themes/twentyfifteen/header.php', $load_once = TRUE, $args = [] ).../template.php:749
80.06224130832require_once( '/var/www/html/wp-content/themes/twentyfifteen/header.php ).../template.php:814
90.06244138240wp_head( ).../header.php:18
100.06244138240do_action( $hook_name = 'wp_head' ).../general-template.php:3197
110.06244138456WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
120.06244138456WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
130.06274141872wp_enqueue_scripts( '' ).../class-wp-hook.php:341
140.06274141872do_action( $hook_name = 'wp_enqueue_scripts' ).../script-loader.php:2311
150.06274142088WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
160.06274142088WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
170.06294143976twentyfifteen_scripts( '' ).../class-wp-hook.php:341
180.06324145496wp_style_add_data( $handle = 'twentyfifteen-ie', $key = 'conditional', $value = 'lt IE 9' ).../functions.php:440
190.06324145496WP_Styles->add_data( $handle = 'twentyfifteen-ie', $key = 'conditional', $value = 'lt IE 9' ).../functions.wp-styles.php:245
200.06324145496WP_Dependencies->add_data( $handle = 'twentyfifteen-ie', $key = 'conditional', $value = 'lt IE 9' ).../class-wp-styles.php:385
210.06324145496_deprecated_argument( $function_name = 'WP_Dependencies->add_data()', $version = '6.9.0', $message = 'IE conditional comments are ignored by all supported browsers.' ).../class-wp-dependencies.php:317
220.06324151448wp_trigger_error( $function_name = '', $message = 'Function WP_Dependencies->add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers.', $error_level = 16384 ).../functions.php:5925
230.06334270984trigger_error( $message = 'Function WP_Dependencies-&gt;add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers.', $error_level = 16384 ).../functions.php:6131

( ! ) Deprecated: Function WP_Dependencies-&gt;add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers. in /var/www/html/wp-includes/functions.php on line 6131
Call Stack
#TimeMemoryFunctionLocation
10.0000484048{main}( ).../index.php:0
20.0000484400require( '/var/www/html/wp-blog-header.php ).../index.php:17
30.06074100984require_once( '/var/www/html/wp-includes/template-loader.php ).../wp-blog-header.php:19
40.06214129976include( '/var/www/html/wp-content/themes/twentyfifteen/single.php ).../template-loader.php:125
50.06214129976get_header( $name = ???, $args = ??? ).../single.php:10
60.06224130192locate_template( $template_names = [0 => 'header.php'], $load = TRUE, $load_once = TRUE, $args = [] ).../general-template.php:48
70.06224130288load_template( $_template_file = '/var/www/html/wp-content/themes/twentyfifteen/header.php', $load_once = TRUE, $args = [] ).../template.php:749
80.06224130832require_once( '/var/www/html/wp-content/themes/twentyfifteen/header.php ).../template.php:814
90.06244138240wp_head( ).../header.php:18
100.06244138240do_action( $hook_name = 'wp_head' ).../general-template.php:3197
110.06244138456WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
120.06244138456WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
130.06274141872wp_enqueue_scripts( '' ).../class-wp-hook.php:341
140.06274141872do_action( $hook_name = 'wp_enqueue_scripts' ).../script-loader.php:2311
150.06274142088WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
160.06274142088WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
170.06294143976twentyfifteen_scripts( '' ).../class-wp-hook.php:341
180.09084272088wp_style_add_data( $handle = 'twentyfifteen-ie7', $key = 'conditional', $value = 'lt IE 8' ).../functions.php:444
190.09084272088WP_Styles->add_data( $handle = 'twentyfifteen-ie7', $key = 'conditional', $value = 'lt IE 8' ).../functions.wp-styles.php:245
200.09084272088WP_Dependencies->add_data( $handle = 'twentyfifteen-ie7', $key = 'conditional', $value = 'lt IE 8' ).../class-wp-styles.php:385
210.09084272088_deprecated_argument( $function_name = 'WP_Dependencies->add_data()', $version = '6.9.0', $message = 'IE conditional comments are ignored by all supported browsers.' ).../class-wp-dependencies.php:317
220.09084272408wp_trigger_error( $function_name = '', $message = 'Function WP_Dependencies->add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers.', $error_level = 16384 ).../functions.php:5925
230.09094272632trigger_error( $message = 'Function WP_Dependencies-&gt;add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers.', $error_level = 16384 ).../functions.php:6131

How to Use a Joystick with Serial Monitor

This project will show you how to use joystick with serial monitor.

Operation and uses

 

The joystick is similar to two potentiometers connected together, one for the vertical movement (Y-axis) and other for the horizontal movement (X-axis).

 

 

The potentiometers are variable resistances and, in a way, they act as sensors that provide us with varying voltage depending on their rotation.

Generally, joysticks are used in the military, leisure and aviation sectors.

 

Using the joystick pins

 

VCC

GND

VRx -> Variable resistance x

VRY -> Variable resistance Y

SW -> Switch / Button

Connection

MODULE -> ARDUINO

  • VCC -> 5V
  • GND -> GND
  • VRx -> A0
  • VRy -> A1
  • SW -> Pin 2
int VRx = A0;
int VRy = A1;
int SW = 2;

int xPosition = 0;
int yPosition = 0;
int SW_state = 0;
int mapX = 0;
int mapY = 0;

void setup() {
  Serial.begin(9600); 
  
  pinMode(VRx, INPUT);
  pinMode(VRy, INPUT);
  pinMode(SW, INPUT_PULLUP); 
  
}

void loop() {
  xPosition = analogRead(VRx);
  yPosition = analogRead(VRy);
  SW_state = digitalRead(SW);
  mapX = map(xPosition, 0, 1023, -512, 512);
  mapY = map(yPosition, 0, 1023, -512, 512);
  
  Serial.print("X: ");
  Serial.print(mapX);
  Serial.print(" | Y: ");
  Serial.print(mapY);
  Serial.print(" | Button: ");
  Serial.println(SW_state);

  delay(100);
  
}

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.