Current from I/O PIN

Looks fine. I woudn't use that seriese resistor on the input, it is just a waste, but it does no harm.