5-way navigational key

5-way navigational key

5-way navigational key

June 2, 2017

Introduction

evive has inbuilt 5-way navigational (or Joystick), which is used to navigate in evive menu based system. The navigational key has 4 directions: left, right, up and down. This information is provided by the analog pin A11.

Joystick or 5-way Navigation Key

Getting Joystick input from Arduino IDE

The table provides you with the corresponding values for directions:

  

Example

The sample code is provided below:

The center switch is connected to the digital pin 19 in active or high mode. This means that if the switch is pressed, then pin 19 is high, otherwise, the pin is LOW.

Getting Joystick Input in Scratch

You can get the state of evive Joystick using Navigation key is in () direction. This block can be found under the Robots palette in the extension evive Inbuilt tools. evive has a 5-way navigation key, 4 of them are for up, down, right and left direction. This block checks if the navigation key is in one of the four particular directions. The direction for which you wish to check is your choice and can be chosen from the drop down on the block.

evive Notes Icon
Note: This block can be used in Arduino Mode as well as in Scratch Mode.

Example

  • In this script the sprite moves up, down, left and right according using the navigation key and rotate it 360 degrees if the navigation switch is pressed in z direction.

Scratch Mode: Navigation key use

 

Share this Page
Facebook
Twitter
Google+
Pinterest
Reddit
Print
Related Tutorials
Featured Projects
Drip Irrigation System
Intermediate
Chetan
Drip Irrigation System

Introduction Drip irrigation system is a type of micro-irrigation of soil which has the potential to save water and nutrients by allowing water to drip slowly to the roots of

Explore this Project

Leave a Reply

Leave a Reply

Close Menu
×

Cart