Difference between revisions of "Component: Wii Nunchuk (Movement Orientation)"
From Flowcode Help
Jump to navigationJump to search (Created page with "{| style="width:50%" |- | width="20%" style="color:gray;" | Author | Matrix TSL |- | width="20%" style="color:gray;" | Version | 2.0 |- | width="20%" style="color:gray...") |
|||
Line 20: | Line 20: | ||
==Detailed description== | ==Detailed description== | ||
+ | |||
+ | |||
Line 36: | Line 38: | ||
==Examples== | ==Examples== | ||
+ | |||
+ | |||
Line 53: | Line 57: | ||
− | == | + | ==Macro reference== |
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
Revision as of 14:14, 20 January 2023
Author | Matrix TSL |
Version | 2.0 |
Category | Movement Orientation |
Contents
Wii Nunchuk component
A component to interface the Wii Nunchuck which features a 3-axis 10-bit Accelerometer A 2-axis 8-bit joystick and two digital button inputs. Interfaced using a standard I2C bus at 100KHz. Nunchuk must be powered at 3V3 to avoid damage.
Component Source Code
Please click here for the component source code: FC_Comp_Source_WiiNunchuck.fcfx
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Macro reference
![]() |
SimReset1G |
Resets the simulation to 0.0 on X and Y and 1.0 on Z as if the accelerometer was sitting completely horizontal. | |
![]() |
Return |
![]() |
ReadJoystick |
Reads a single joystick axis | |
![]() |
Axis |
0=X, 1=Y | |
![]() |
Return |
![]() |
ReadSwitch |
Reads one of the nunchuck switches | |
![]() |
Switch |
0=Z, 1=C | |
![]() |
Return |
![]() |
Sample |
Reads from the nunchuck and updates the local variables. | |
![]() |
Return |
![]() |
ReadAccelerometer |
Reads a single Accelerometer axis | |
![]() |
Axis |
0=X, 1=Y, 2=Z | |
![]() |
Return |
![]() |
Initialise |
Sets up up the communication bus and initialises the accelerometer module. Returns 1 for success and 0 for fail. | |
![]() |
Return |