Are you 100% sure you have the switch on the correct pin? Have you measured the voltage on the pin with the switch in both positions? 0V in one position, 5V (or whatever the supply voltage is) in the other.
Are you 100% sure you have the switch on the correct pin? Have you measured the voltage on the pin with the switch in both positions? 0V in one position, 5V (or whatever the supply voltage is) in the other.
Bookmarks