//--------------slide-------------------------------------- toggle_switch = digitalRead(7); fyi, code is expecting d7, the schematic shows d4.