Skip to content

A simple library to read Arduino joysticks' direction or position.

License

Notifications You must be signed in to change notification settings

0x444d4d/8DirJoystick

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

8DirJoystick

This arduino library enables you to read joysticks to get their coordinates or the direction the joystick is pointing at.

Usage

  • First create a DirJoystick object:
DirJoystick joystick = DirJoystick( int xAxis, int yAxis, short deadZonePct = 5)
  • Then you can either call joystick.readJoystickDirection() which returns one of the following values:

DirE - DirNE - DirN - DirNW - DirW - DirSW - DirS - DirSE

  • Or if you prefer to get the coordinates:
joystick.readJoystick()

About

A simple library to read Arduino joysticks' direction or position.

Topics

Resources

License

Stars

Watchers

Forks

Languages