Migrate all pin handling to strings: pin.input("d2") instead of pin.input(2)