Digital pin trigger level

I'm monitoring the state of charge of a battery in a rough and simple way.
If the voltage is too low, i'd like to trigger a digital pin to low.

If the voltage is high enough, i.e fully charged, i could trigger another pin (or perhaps even the same pin) to high.

For my battery this means 11 volt as empty and perhaps 14 volt as fully charged

Based on the above, by having a suitable voltage division, I could match these levels to the digital input pins, so they reach the trigger levels.

If going to high is 0.6x5, i would voltage divide so that 14 volts means 3 volts over the pin.
Going to low I understand is at another level 0.4x5 or so, so this means another division.

Hope this could work, because it would be really simple to implement, using only resistors.

Thanks for your help!