I have done very little coding and just want to make sure this will work. My largest worry is that when the car is in neutral (value of -10) that it will mess up my shifting calculations. Can anyone read it and tell me if I am right/need to fix anything. The description of each step is commented next to it. I will be using hall effect sensors for each gear and a Leonardo for the connection to my computer. My other thought was instead of using a numeric value for neutral, I could write a command that if all of the 8 pins read high, then it just disregard the function and begin the loop again until it is placed into gear.
shifter_revised.ino (4 KB)