added code to read dpin 2 and enable/disable dpin 9