I tried using the 3.3V pin before to no avail, and the sensor worked with a raspberry pi, so that wasn't the issue. Like rudy suggested, I played around with a multimeter and found that the connection between the headers and the D1 mini was broken. I'm pretty inexperienced with these kinds of devices and didn't realize you needed to solder the pin headers into the chip for that connection to be stable. I just figured those connections were like putting jumper wires into a breadboard .
I tried using the 3.3V pin before to no avail, and the sensor worked with a raspberry pi, so that wasn't the issue. Like rudy suggested, I played around with a multimeter and found that the connection between the headers and the D1 mini was broken. I'm pretty inexperienced with these kinds of devices and didn't realize you needed to solder the pin headers into the chip for that connection to be stable. I just figured those connections were like putting jumper wires into a breadboard .