lift out some constants, add potentiometer handling