Motion Sensor Art Project: 1) Randomness and 2) Distance Detection?

The GPIO pins on the NodeMCU ESP8266 boards are rated for 0v to 3.3v. The NodeMCU Board is most easily powered via its microUSB connector. USB power comes in at 5vdc and is stepped down to 3.3vdc via an onboard voltage regulator chip.