XIM Community

XIMCHUK  (Read 2547 times)

Offline DomA

  • Member
  • *
  • Posts: 196
    • View Profile
    • Youtube
  • PSN ID: DomAll
XIMCHUK
« on: 02:59 PM - 08/17/15 »
I currently use the NAV but have always thought it could be a lot more comfortable. As I had a Nintendo nunchuk lying around I considered trying to transplant the NAV insides.

However, I then stumbled upon a few posts dotted around including the following by W11ce;
http://xim4.com/community/index.php?topic=25969.0
Many thanks W11ce for your code and for your help.

and this one about using the nunchuk and teensy to build a mouse
http://www.instructables.com/id/USB-Mouse-Made-Out-Of-A-Wii-Nunchuck/

So I bought a teensy 3.1, breadboard, downloaded W11ce's joystick files and set to work.

I left the joystick connected to the PCB and just added another button on the right hand side to take care of duties normally handled by joystick down button (lacking on nunchuk but if I decide to keep using this I may swap the joystick out for one with a switch).





Code: [Select]
// Pin 13 has the LED on Teensy 3.1 give it a name
int led = 13;
#define STICK_X 0
#define STICK_Y 1
#define OVERVAL 256
int Xstick;
int Ystick;

// the setup routine runs once when you press reset:
void setup() {               
  // initialize the digital pin as an output.
  // initialize the digital pins as inputs.
  pinMode(led, OUTPUT);     
  pinMode(0, INPUT_PULLUP);
  pinMode(1, INPUT_PULLUP);
  pinMode(2, INPUT_PULLUP);
}

// the loop routine runs over and over again forever:
void loop() {
  Xstick = map(analogRead(STICK_X), OVERVAL, 1024-OVERVAL, 0, 1024);
  Xstick = constrain(Xstick, 0 , 1023);
  Joystick.X(Xstick);
  Ystick = map(analogRead(STICK_Y), OVERVAL, 1024-OVERVAL, 1024, 0);
  Ystick = constrain(Ystick, 0 , 1023);
  Joystick.Y(Ystick);
  Joystick.button(1, !digitalRead(0));
  Joystick.button(2, !digitalRead(1));
  Joystick.button(3, !digitalRead(2));
  digitalWrite(led, HIGH);   // turn the LED on (HIGH is the voltage level)
}
« Last Edit: 05:04 PM - 10/01/15 by DomA »
PS3/PS4 2tb - XIM4 - G502 - Nav - Optoma HD141X - HD598 - Mixamp - Hauppauge HD PVR Rocket

http://www.twitch.tv/snafudom/
https://www.youtube.com/user/snafudom/

Offline DomA

  • Member
  • *
  • Posts: 196
    • View Profile
    • Youtube
  • PSN ID: DomAll
Re: XIMCHUCK
« Reply #1 on: 03:00 PM - 08/17/15 »
I've only given the XIMCHUK a very quick try in BF-HL but it seems to work pretty well. Obviously doesn't have as many buttons as the NAV but is slightly more comfortable and I use a G502 anyway.

One oddity so far is that joystick up and down doesn't work in the in game menu for BF-HL even though it works fine in game and on the Playstation home screen. To get round this I've mapped up and down arrow functions to spare mouse buttons instead, and this works fine.
« Last Edit: 04:46 PM - 08/17/15 by DomA »
PS3/PS4 2tb - XIM4 - G502 - Nav - Optoma HD141X - HD598 - Mixamp - Hauppauge HD PVR Rocket

http://www.twitch.tv/snafudom/
https://www.youtube.com/user/snafudom/

Offline OBsIV

  • Administrator
  • MVP
  • *
  • Posts: 36683
  • It's obsessive.
    • View Profile
    • OBsIV's Blog
Re: XIMCHUK
« Reply #2 on: 03:53 PM - 08/17/15 »
Nice!
Get the most out of your XIM APEX, read the XIM APEX Support FAQ.

Offline Od1n

  • Global Moderator
  • MVP
  • *
  • Posts: 29909
    • View Profile
Re: XIMCHUK
« Reply #3 on: 02:38 AM - 08/18/15 »
man whenever i use the NAV i clearly notice there is at least one button missing on it that you can click while walking, your side-button solves that quite well

nice stuff :)
PS4 & X1 | C: MS | XIM4 | FW: the latest ofc! :) | Mon: BenQ XL2420Z | Pad: Zowie G-SR | KB: Ducky DK1008L Cherry Red O-Rings| A: AKG K701 Creative X7 Antlion Modmic | M: Zowie EC1-A | D: 3200 | P: 1000hz | BF4 4 HIP: 35 ADS: 20

My Fortnite Creator Code: beamimpact
Check out my Youtube Channel: XIMGameplay

Offline piiwii

  • MVP
  • *
  • Posts: 2191
    • View Profile
Re: XIMCHUK
« Reply #4 on: 10:41 PM - 09/01/15 »
Awesome, would you be able to post step by step instructions for those of us who don't have a clue about this sort of thing?
Setup: XIM Apex, Titan Two, K780 keyboard, G Pro Wireless mouse, Logitech G440 mousepad, LucidSound LS30 headphones, Netduma router, Ubiquiti UniFi AP LR wireless access point

My RAINBOW SIX SIEGE Titan Two Mega Script: https://youtu.be/x-9NtxyySVM

What is a ballistic curve? Click here to learn more: https://bit.ly/2qzUAjg

Comprehensive guide on scissor style keyboards: https://goo.gl/UtkZyX

Find me on the ConsoleTuner (Titan Two) forums: pablosscripts

Offline DomA

  • Member
  • *
  • Posts: 196
    • View Profile
    • Youtube
  • PSN ID: DomAll
Re: XIMCHUK
« Reply #5 on: 09:56 AM - 09/28/15 »
Hi Piiwii, all the stuff is really included in the 2 links at the very top already.

However, I'm not 100% happy with the lack of navigation that I get in the BF game menus so I will be swapping out the wii joystick for something else. When I do this I'll try and document it more comprehensively. Navigation fixed and code added to first post in thread. I will probably still swap the joystick out to get one with a button built in.

Dom
« Last Edit: 12:36 PM - 10/02/15 by DomA »
PS3/PS4 2tb - XIM4 - G502 - Nav - Optoma HD141X - HD598 - Mixamp - Hauppauge HD PVR Rocket

http://www.twitch.tv/snafudom/
https://www.youtube.com/user/snafudom/