Is it a valid usage of any digital or analog pin as a GND connection or as a VCC connection(set as HIGH or LOW) for other devices?
I know the current ratings of the pins but assuming they are within specs for the external circuit, is this a bad idea for any reason?
Regards
My personal feeling is that while it may be possible to do it that way (taking into account ALL limitations), a better way would be to use the IO pin to drive a transistor or solid state relay, and use that to power your device.
You could elaborate on WHAT device you wish to turn on or off, which would enable a more specific answer to your question.
Regards,
Graham
Yes it is a bad idea. Power supplies need to be stable and noise free, digital outputs are not. A digital output never gets to be zero volts and you should have no need to switch things on and off like that anyway.