Powering an SI7021 sensor from a digital pin

PaulS:
There is. Don't. It's really that simple.

Use the pin to control the gate on a transistor. Transistors need very little current to open or close the gate.
You probably killed the digital pin by pulling too much current. 40mA is the maximum recommended. Your measurements seem to indicate that you are drawing less than that, but you haven't said exactly how you measured the current, so I tend to think that "incorrectly" is the answer.

Hmmm, ok. I measured with my digital multimeter that has a "Max" function, there is a delay(1000) right after setting the pin to high to power the sensor, and I have let it go through about 20 cycles.

Also the datasheet claims 4mA absolute max... but sure, I can live with a transistor :slight_smile:

Franck