Skip to content

PiChuk, a wireless Raspberry Pi joystick controller.

Advertising
Advertising
?
Creation quality: 5.0/5 (1 vote)
Evaluation of members on the printability, utility, level of detail, etc.

  • 1.6k views
  • 2 likes
  • 18 downloads

License
3D design format
Folder details Close
  • between_pi_and_powerboost_bracket.stl
  • between_powerboost_and_hdmi.stl
  • nunchuckBody.stl

Learn more about the formats

Publication date 2023-05-17 at 20:26
?
Published to Thingiverse on: 2019-04-30 at 04:54
Design number 1225761

3D printer file info

3D model description

This is my attempt to stick a Pi Zero inside of a Wii Nunchuk. I use this to control an organization-type program I made, but I can see this being useful for videogames as well.

It is powered by a 750mAH LiPo battery used for drones. I used an Adafruit Powerboost to regulate the power. It uses the Wii Nunchuk's joystick PCB, buttons, and top cover.

I tried to get this as compact as possible, but there wasn't nearly enough room to actually fit a Pi Zero completely in a Wii Nunchuk, not even considering the other parts. I modelled the lower body of the Nunchuk to fit all the components in the hand-grip part. I planned to make a cover for the grip portion, but it feels ok to hold already, and I didn't want to add extra bulk.

I use this with my Vufine wearable display, which is why I needed it to have a standard HDMI port.

Thankfully, the Nunchuk's PCB has a built-in analogue-digital converter, so I didn't have to use a separate one.


Components:


To get the Pi to recognize the joystick's signal, I used this module.To use the Nunchuk's hardware to control the cursor, I used the Python module Pynput.


This is the script I made to control the mouse and click buttons:

from nunchuck import nunchuck
import time
from pynput.mouse import Button, Controller
wii = nunchuck()
mouse = Controller()


while True:

    x = wii.joystick_x()
    y = wii.joystick_y()
    x_scaled  = ((x - 130)*2)/260
    y_scaled = ((y-135)*2)/270
    x_curve = int((x_scaled * abs(x_scaled))*100)
    y_curve = int((y_scaled * abs(y_scaled))*100)

    time.sleep(0.02)
    mouse.move(x_curve, y_curve)

    if wii.Button_z() = True:
        mouse.click(left,1)

    if wii.Button_c() = True:
        mouse.click(right,1)
'''
You might have to tweak the values for x_curve and y_curve because each Wii joystick potentiometer I've tried had different limits.
It's just rise over run, where 2(x-130) is Ξ”x and 260 is Ξ”y, so if your cursor moves in the opposite direction after moving the joystick all the way,
you need to lower the value of that direction. 
'''
Advertising


Issue with this design? Report a problem.

Would you like to support Cults?

You like Cults and you want to help us continue the adventure independently? Please note that we are a small team of 3 people, therefore it is very simple to support us to maintain the activity and create future developments. Here are 4 solutions accessible to all:

  • ADVERTISING: Disable your banner blocker (AdBlock, …) and click on our banner ads.

  • AFFILIATION: Make your purchases online by clicking on our affiliate links here Amazon.

  • DONATE: If you want, you can make a donation via Ko-Fi πŸ’œ.

  • WORD OF MOUTH: Invite your friends to come, discover the platform and the magnificent 3D files shared by the community!


Sharing and downloading on Cults3D guarantees that designs remain in makers community hands! And not in the hands of the 3D printing or software giants who own the competing platforms and exploit the designs for their own commercial interests.

Cults3D is an independent, self-financed site that is not accountable to any investor or brand. Almost all of the site's revenues are paid back to the platform's makers. The content published on the site serves only the interests of its authors and not those of 3D printer brands who also wish to control the 3D modeling market.

100% secure payment by credit card, PayPal, Apple Pay, Google Pay, etc.
View all payment options.