Code for running my homebuilt Dispenser