I would like make educational shield for playing with Arduino, where (at least couple of) pins would be connected to grounded switches (so could be configured as INPUT, or INPUT_PULLUP a digitalRead() in the program) and at the same time there would be two LEDs (say GREEN for 0 and RED for 1) to indicate the status of the switch (pressed or free).
And also there is possibility to program the PIN to OUTPUT and make the LEDs just shine with digitalWrite() (HIGH for red, LOW for green).
But as it can be used by beginers, I would like to make sure, that even if the PIN is HIGH and button is pressed (so connected to GROUND), then no harm happens to the PIN.
As it would be all on the shield, I do not have to care about other sources of power. And the error condition (OUTPUT vs switch pressed) can be UNDEFINED (that means result in none, one or both LEDS to shine full/part, I do not care).
Is it possible to arrange it with just some resistors, or I have to decouple one/both the LEDS with transistors to enhance the signal, separate them from shining both with open swith (and pullup) and protect the pin?
(creating PCB is not problem for me, I just want make it safe for childs to play with and have it ready without sticking wires to breadboard (and possibly shortcut power or something like that) for couple of first "projects")
(Here is the IDEA, but the editor filled some values, ignore them please)
Thank you for helping me out :)