Here is how I use the Analog pins 2 and 3.
pinMode(16, OUTPUT); // +5V - Arduino analog pin 2
pinMode(17, OUTPUT); // GND - Arduino analog pin 3
I have 2 functions to power on and power off the rf transmitter:
digitalWrite(16,HIGH); // Pin 2
digitalWrite(17,LOW); // Pin 3
delay(1000); // wait for things to stabilize
So, I understand that I should use digital pins? I have been using the same code with analog pin 2 and 3 when I powered the RF transmitter with only 5V. Because at 5V the distance I need is not enough, I switch to 12V by using the transistor.
I hope to do some more testing this afternoon.