Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
joystick [2017/02/23 03:54]
99.174.81.42 [Mapping Voltage to Position]
joystick [2019/08/23 12:39]
wolfmanjm [Getting Started]
Line 19: Line 19:
 <callout type="​danger"​ icon="​true"​ title="​Not yet completed or released">​ <callout type="​danger"​ icon="​true"​ title="​Not yet completed or released">​
 Note this page is a work in progress and the joystick functionality is not yet released in smoothieware. Note this page is a work in progress and the joystick functionality is not yet released in smoothieware.
 +To test it you need to use pull request [[https://​github.com/​Smoothieware/​Smoothieware/​pull/​1122]],​ and instructions on how to test a Pull request are here [[http://​smoothieware.org/​third-party-branches#​checking-out-pull-requests]]
 </​callout>​ </​callout>​
 === Hardware Requirements === Hardware Requirements
Line 57: Line 58:
  
 For a joystick, you will need to connect each wiper (the left/right and up/down) to different analog pins (e.g. 1.30 and 1.31). For a joystick, you will need to connect each wiper (the left/right and up/down) to different analog pins (e.g. 1.30 and 1.31).
- +{{:​joystick:​joystick_connections.png?​nolink&​400|image of joystick connection}}
-(image of joystick connection)+
  
 == Configuration == Configuration
Line 67: Line 67:
 The way the Joystick module performs this conversion is to first measure the voltage coming in. The module then subtracts off an offset, called <​kbd>​zero_offset</​kbd>​. The module then scales the voltage reading so that the <​kbd>​zero_offset</​kbd>​ voltage becomes 0, and the <​kbd>​endpoint</​kbd>​ voltage becomes 1 or -1 (depends on if <​kbd>​endpoint</​kbd>​ is greater or less than <​kbd>​zero_offset</​kbd>​). Any values which end up outside the -1 to 1 range are fixed to be at +/- 1. The way the Joystick module performs this conversion is to first measure the voltage coming in. The module then subtracts off an offset, called <​kbd>​zero_offset</​kbd>​. The module then scales the voltage reading so that the <​kbd>​zero_offset</​kbd>​ voltage becomes 0, and the <​kbd>​endpoint</​kbd>​ voltage becomes 1 or -1 (depends on if <​kbd>​endpoint</​kbd>​ is greater or less than <​kbd>​zero_offset</​kbd>​). Any values which end up outside the -1 to 1 range are fixed to be at +/- 1.
  
-<WRAP center round box 50%>+<WRAP center round box 80%>
 {{ :​joystick:​joystick_mapping_diagram.png?​1000 |}} {{ :​joystick:​joystick_mapping_diagram.png?​1000 |}}