So I've been learning about diodes (since I don't have an electrical background).
Technically, current flows from the negative side to the positive side (electron current flow).
However, a diode allows a flow from the + to the - side (forward bias) and disallows a flow from the - side to the + side (reverse bias).
So, let's say I want to protect the GPIO pin on a raspberry pi (this would be the + side) and have a diode, then a circuit and in the end, connected to a ground pin (-).
How can the diode protect the GPIO pin, when the current actually comes for the negative side to the positive side? It makes more sense to think that the electricity within a diode can flow from the positive to the negative side, in order to protect the positive side. The ground (- side) is less important (or is this wrong?).
How can a diode allow electricity to flow from the + side to the - side, while electron flow is the opposite?
Is my thinking wrong?
Edit: the following schematic shows where I can see a contradiction and what I am confused about.