A/C through a single VCC pin

Hello everyone, I am using the Spark Fun - Soil Moisture Sensor to measure soil moisture content, which only requires 3 pins for connection.

I read a few articles describing how to formulate an A/C using 2 digital pins, and reversing the current with a delay, but the examples I saw pertained to a D.I.Y built sensor. I connected a 2nd digital pin to the VCC on my SparkFun, and coded an imitation of the reversal, and even output the values to a serial monitor, but I'm not sure if it actually worked.

I was just wondering if it was possible to provide power using 2 digital pins, instead of 1, on a 3 pin sensor?

Here's a copy of my code:

void setup()
{
 pinMode(SOIL_POWER_UP, OUTPUT); //pin 7
 pinMode(SOIL_POWER_DOWN, OUTPUT); //pin 8

 Serial.begin(9600);
 Serial.println("RESET");
}


void measureSoilMoisture()
{
int powerUp = digitalRead(SOIL_POWER_UP);
int powerDown = digitalRead(SOIL_POWER_DOWN);

digitalWrite(SOIL_POWER_UP, HIGH);
digitalWrite(SOIL_POWER_DOWN, LOW);
delay(1000);

Serial.print(powerUp);
Serial.print(' ');
Serial.print(powerDown);
Serial.println();

 digitalWrite(SOIL_POWER_UP, LOW);
digitalWrite(SOIL_POWER_DOWN, HIGH);
delay(1000);

Serial.print(powerUp);
Serial.print(' ');
Serial.print(powerDown);
Serial.println('\n');
}

Also a copy of the output:
RESET
0 0
0 0

0 1
0 1
(repeats 0 1)

The probe you have has a transistor on it. So AC is useless...

Does that mean I can only run a constant power supply, or is it enough to connect it to a digital pin?

Yes, connect it to a digital pin like it says on the schematic. Only turn power on a few milliseconds before you want to read it and then turn the power off right away.

You will still get corrosion on the "ground" pin of the sensor since your circuit ground will always be a little different to the soil (unless this is an insulated pot plant). So it's good for science-fair demonstrations and probably one growing season but won't last long in the wild.