Jump to content



Photo
- - - - -

Pinscape Pico (plunger) - emulate pressed enter key if z axis < -340


  • Please log in to reply
3 replies to this topic

#1 zag

zag

    Hobbyist

  • Members
  • PipPip
  • 10 posts

  • Flag: Switzerland

  • Favorite Pinball: HS

Posted 23 July 2026 - 09:49 AM

Is there a way to emulate a pressed enter key if the value  of the z axis is smaller than for example -340? -340 is the min value the plunger can normaly reach. If I push the plunger in against the front spring I can reach a lower value. 

 

zblaunch works in the configuration tool, when the plunger is pushed in (ZB launch text highlighted, when reaching < 340), but no enter key is send to any Windows application. 

 

 

 

    plunger: {
         source: "pico_adc",   // source sensor type; usually inferred automatically from available sensors
         autoZero: true,       // enable auto-zeroing; only applies to quadrature sensors, ignored otherwise
         autoZeroTime: 5000,   // time in milliseconds for auto-zeroing; plunger must be stationary this long to auto-zero
         powerLaw: 2,          // power-law exponent in brightness-to-distance calculation, only for VCNL4010
         zbLaunch: {
           pushThreshold: -350,
           pulseTime: 70,
       action: {type:"key",key: "enter"},
        },
     },


     pico_adc: {
         gpio: 26,
     },

 


Edited by zag, 23 July 2026 - 03:24 PM.


#2 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,346 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 23 July 2026 - 04:08 PM

Do you have a DOF output port set up as the ZB Launch port, and is that port turned ON in DOF while you're testing?  ZB Launch only sends its key input when the DOF port is ON - that way, it only sends the Launch Ball key input when you're actually playing a table with a Launch Ball button.  You usually DON'T want the Enter key to be sent to a table that has a regular plunger, because Enter activates VP's timed plunger-pull behavior.  The timed-pull behavior conflicts with the mechanical plunger input, so you usually only want one or the other for a given table.  The ZB Launch DOF port lets the table tell Pinscape which type of plunger the active table has, so that Pinscape can send the Enter key only for Launch Ball tables.

 

If you want the Enter key to be sent unconditionally, whether or not the DOF ZB Launch port is activated, you can configure a button input (in the buttons:[ ] array) with type:"plunger".  That lets you set up a button event that ALWAYS fires when the plunger hits a certain range, without any extra DOF conditions being met.


Edited by mjr, 23 July 2026 - 04:16 PM.


#3 zag

zag

    Hobbyist

  • Members
  • PipPip
  • 10 posts

  • Flag: Switzerland

  • Favorite Pinball: HS

Posted 23 July 2026 - 04:38 PM

Thank you, just figured out another way by browsing your documentation and trying to understand how to configure it - it took a long time. I m not an expert in reading and configuring JSON files. 

 

The solution has probably the same problem you mentioned above.

    buttons: [

             source: { type: "zblaunch", modal: false },
             action: { type: "key", key: "enter" },
         },     
     ],

Edited by zag, 23 July 2026 - 04:39 PM.


#4 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,346 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 23 July 2026 - 05:19 PM

Good find - I forgot about that option.  Using "modal; false" will indeed bypass the DOF port while still using the same ZB Launch logic for the plunger gesture detection.

 

If you do find that it's troublesome to have the Enter key sent for tables with plungers, you only have to change that to "modal: true" to make it conditional on the DOF port.