Interfacing Joystick module with evive

About This Tutorial
In this tutorial we will interface joystick module with evive and we will move rectangular box drawn on TFT display according to the movement on joystick module
Tutorial Info

Components Required


The joystick is a device  that translates your hand movement in to electrical signal,And the movements are converted by computational unit in to entirely mathematical, in other words joystick translates entirely physical movement.The joystick in the picture is nothing but two potentiometer that allow us to measure the movement of stick in 2-D. Potentiometer are basically variable resistor , In joystick module Potentiometers act as  sensor providing  us with a variable voltage depending on the rotation of the device around its shafts.

Pin description

joystick module have 5 pins  ( 2- power supply pins and 3- signal pins)

  • VCC
  • GND
  • VRX ( signal pin for x direction )
  • VRY ( signal pin for y direction )
  • SW   ( signal pin for Switch button )

Analog output obtained for each direction

          Direction                         Analog output  (Between 0 to 1023)

                                             X = 530          Y = 518                                       

              UP                                             X = 1023        Y = 518
           DOWN                                             X = 0               Y = 518
          RIGHT                                             X = 530           Y = 1023
           LEFT                                             X = 530           Y = 0


Circuit diagram

  • Connect “VCC” of joystick module to “VCC” of evive 
  • Connect “GND” of joystick module to “GND” of evive 
  • Connect “VRX” of joystick module to analog pin “A0” of evive
  • Connect “VRY” of joystick module to analog pin “A1” of evive


we have divided code in to two parts 

  • 1st part of code will print analog output value for each direction on serial monitor , this analog output values will be used in second part of code to move block 
  • 2nd part of code will move block drawn on tft display according to the direction in which stick is moved


Expected result








Related Projects
ldr circuit
How to interface LDR with evive
This tutorial discusses what are light dependent resistors (LDR) and how to interface them with evive in Scratch with the help of a sample circuit and program in Scratch mode.
All articles loaded
No more articles to load
Share this Tutorial
Share on facebook
Share on twitter
Share on google
Share on pinterest
Share on reddit
Share on print
Featured Projects
All articles loaded
No more articles to load

Leave a Reply

Close Menu


Extra 10% OFF on ALL products. Coupon – STEMLOVEREXTRA10OFF