Added code for hopper solenoid functionality