Jump to content



Photo
- - - - -

KL25Z - pinout for accelerometer to map to a trigger/button?

Nudge pinscape ipac

  • Please log in to reply
2 replies to this topic

#1 KillerQ

KillerQ

    Hobbyist

  • Members
  • PipPip
  • 27 posts

  • Flag: United States of America

  • Favorite Pinball: Adam's Family

Posted 18 October 2023 - 08:00 AM

Hello,

I have the KL25Z board and the accelerometer works great as designed (analog joystick output in windows).

That being the case, is there a way to have the forward/back/left/right nudge signal be sent out over the i/o pins on the board so that I could have the accelerometer motion trigger an normally open singnal/pin on my iPAC2 board?

That would save me having to use a button mapper on games that dont like the native analog out of the KLZ52 board.

Thanks!

Edited by KillerQ, 18 October 2023 - 08:44 AM.


#2 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,331 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 19 October 2023 - 06:34 PM

There's a long-standing request to generate a keystroke when the accelerometer reads past a certain threshold.  It's the same thing you're trying to do, but using the internal keyboard/joystick interface rather than generating a hardware signal on a GPIO.  Is there any reason you'd need an external hardware signal instead?



#3 KillerQ

KillerQ

    Hobbyist

  • Members
  • PipPip
  • 27 posts

  • Flag: United States of America

  • Favorite Pinball: Adam's Family

Posted 21 October 2023 - 05:29 PM

Hey, mjr,


Thanks for the response! That feature request would be super-convenient for a handful of reasons.

To answer your question, I have always been a fan of the I-PAC2 units when building my controllers. Needless to say, I used an I-PAC 2 in my current pinball controller built. I first started to use a Wii wiimote to add nudge functionality to my controller. This worked A but constantly having to pair the wiimote every time I rebooted my computer was annoying, and, plus, I wanted a more permanent, wired solution.

Thats what got me to research and learn about the KL25Z and your amazing Pinscape software. I plugged the board in, added the software, configured it, and it worked beautifully outside of the box. Heres an image of my current controller that may help explain my layout.

https://imgur.com/gallery/5iVOBpO

So. I use the I-PAC 2 for all of the buttons and your board setup for the accelerometer. Im able to use thise setup perfectly with other pinball software games such as Xenotilt and PinballFX 3 perfectly fine. I currently map the accelerometer directions to keyboard strokes via antimicroX.

However, and, Im not sure why, I always thought that the I/o pins on the KL25Z with your software were always only used for DOF and not buttons. I think part of the reason I glossed over this was that I read about the I/o pins only handling extremely low voltage and that an external controller board would be needed. After more research, and after your response in this thread, I not realize that traditional arcade buttons are excluded from this low voltage situation and that they can be connected directly to the KL25Z and mapped to keyboard functions.

That being said, the desire for the accelerometer directions to be mapped to a keystroke via the pinscape software would be an amazing addition. It would literally eliminate the need to ANY third party mapping software.

So, because of my current solution, my original question of needing the accelerometer mapped to xinput is a moot point since antimicro works - and ESPECIALLY if that mapping is eventually baked into your software.

Actually, I think I will solder some headers to my KL25Z today and attach the buttons directly to it - and take the IPAC out of the equation since your software will give me the exact same functionality- Ill still use antimicroX for the tilting (PBFX3, etc)for the time being.

But if you ever need a guinea pig to test or beta test this feature, I am more than willing and will provide tons of detailed feedback.

I appreciate your help - just let me know if you ever need the help with beta testing.

Thanks!


*** Update ***

I have now removed the I-PAC board and everything is assigned to keys natively on the KL25Z (except nudge, which is mapped tomorrow keys using antimicroX). Its working like a dream! Heres a pic of the updated guts: https://imgur.com/gallery/GC3MiDj

Edited by KillerQ, 22 October 2023 - 02:25 AM.






Also tagged with one or more of these keywords: Nudge, pinscape, ipac