Hi -
I am using pins 40 + 41 (analog 0 + 1) to read from a Sharp IR sensor. That works fine on it's own. I am also using pins 42-44 to trigger a Darlington transistor to control some motors (digitalWrite). Those also work fine on their own.
When I combine the two routines in one sketch the analogRead kills the digitalWrite - and the motors don't run. In the barebones sketch below, before I added
pinMode(44, OUTPUT);
at the start of each loop, the motor would run just one time and no more after the analogRead got called.
I guess I have a workaround in redeclaring 'pinMode' at the start of each loop (ugly) but should this be necessary? (I know I can use other pins but I'm all cabled up and running short of pins)
In other words, does using one of the Analog pins to do analog reads mean that none of the other Analog pins can be used as digital pins at the same time?
Is this a bug or as designed/fact of life? If this is as designed then some specific mention in the docs would be good (for my heartburn...

)
thanks!
Code:void setup() {
pinMode(44, OUTPUT);
}
void loop()
{
// pinMode(44, OUTPUT); // adding this apparently resets something... ;-)
digitalWrite(44, HIGH);
delay(500);
digitalWrite(44, LOW);
delay(500);
// the digitalWrites above no longer work after this is called
int sensorValue = analogRead(1);
}