Error: Error connecting DP: cannot read IDR

a digital pin can have 3 states… being brought low is connecting to negitive and results in a 0 value on the pin… being brought high is being connected to positive and results in a 1 … the problem is when the pin is called floating and it is neither connecte high or low and the state is not determined and may switch b etween +/- withour rhyme or reason… sometimes electrical noise will cause unexpected behavior sometime you will set a pull up or pull down resistor to ensure the base state of the digital input is in the state you expect. for example a digital push button pin may be pulled to ground by a resistor…this makes sure the state of the pin is 0… the button connects to the positive… and when it is pressed it will bring the voltage level on the pin up to 1. if you do not add this pull down (OR UP) resistor to the circuit you can have errors