To anyone who is stuck on the second stage. The last digit is 0. and on any other further stages with both the code and the wire on the same stage it is the number of wires. I kept on thinking it was the number of wires on stage 1.
That being said, really fun game! The art style and polish are really good!