Photon A5 for 3.3v power and ground? two questions

I have some easy photo resistor code that sends constant power out using the A5 analog pin. And I use these two commands to do it:
1.
pinMode (A5, OUTPUT); // A5 The pin powering the photoresistor is output (sending out consistent power)
2.
digitalWrite(A5, HIGH); // A5 Next, write the power of the photoresistor to be the maximum possible, so that we can use this for power.

Question 1/2 , Can I set pin A5 to output 3.3v instead of 5v?
Question 2/2, Is it possible to use an analog pin as a ground?

For question 1: the Particle devices GPIO pins only operate at 3.3V. A high signal is always 3.3V. Most pins are 5V-tolerant meaning they can read a 5V signal as high.

For question 2: when you set a GPIO pin low, it does act as a ground where it can “sink” current, but not a lot (maybe 20mA). You can look up more in the datasheets.

2 Likes