OK, I have an idea of what you’re trying to accomplish, however I am missing how SmartThings plays a role in this.
If you want a custom sketch (and it sounds like you do based on what I have read above), you’ll probably simply want to ADD some SmartThings capabilities to your sketch, versus trying to use ST_Anything.
ST_Anything is an application framework, that assumes you are attaching standard devices (temperature, humidity, luminance, relays, etc…) to the microcontroller. ST_Anything then takes care of the rest, making it much simpler to integrate with SmartThings/Hubitat.
Underneath, ST_Anything is using one of my various “SmartThings…” communications libraries (example sketches are included with those microcontroller specific libraries) in order to integrate with SmartThings. Adding one of these libraries to your existing sketch may be the simpler way to go, especially since it sounds like you’re a programmer.
What you’ll need to decide is how you’d like to have your microcontroller appear within SmartThings, using standard ST Capabilities (e.g. switches, buttons, temperatures, etc…) Once you figure that out, I can provide some more guidance. If it is as simple as logging button presses, that is pretty darn simple. These would easily map into the SmartThings “Button” Capability. You’d probably want a SmartApp to monitor the button presses and perform any ST actions desired. webCoRE, for example, could handle this.