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 Both sides next revision
joystick [2017/02/23 03:54]
99.174.81.42 [Mapping Voltage to Position]
joystick [2017/02/23 03:55]
99.174.81.42 [Mapping Voltage to Position]
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 |}}