Replaces manual gpio manipulation with RPi.GPIO