extracted some magic numbers to constants
test sketch for controlling motor with transistor