I’ve got a ESP32 NodeMCU development board and I’m trying to set up a light sensor using the TEMT6000 ground is set to ground, V is set to 3v and data is to p32
the readings i am getting are
[21:31:22][D][adc:056]: 'Testing Brightness': Got voltage=0.53V
[21:31:22][D][sensor:092]: 'Testing Brightness': Sending state 105.46032 lux with 2 decimals of accuracy
[21:31:23][D][adc:056]: 'Testing Brightness': Got voltage=0.81V
[21:31:23][D][sensor:092]: 'Testing Brightness': Sending state 162.19292 lux with 2 decimals of accuracy
[21:31:24][D][adc:056]: 'Testing Brightness': Got voltage=0.14V
[21:31:24][D][sensor:092]: 'Testing Brightness': Sending state 28.84982 lux with 2 decimals of accuracy
[21:31:24][D][sensor:092]: 'Testing uptime do not use': Sending state 39.75800 s with 0 decimals of accuracy
[21:31:24][D][text_sensor:015]: 'Testing Uptime': Sending state '0d 00h 00m 39s'
[21:31:25][D][adc:056]: 'Testing Brightness': Got voltage=0.00V
[21:31:25][D][sensor:092]: 'Testing Brightness': Sending state 0.00000 lux with 2 decimals of accuracy
[21:31:26][D][adc:056]: 'Testing Brightness': Got voltage=0.11V
[21:31:26][D][sensor:092]: 'Testing Brightness': Sending state 21.81197 lux with 2 decimals of accuracy
[21:31:27][D][adc:056]: 'Testing Brightness': Got voltage=0.80V
[21:31:27][D][sensor:092]: 'Testing Brightness': Sending state 159.02321 lux with 2 decimals of accuracy
[21:31:28][D][adc:056]: 'Testing Brightness': Got voltage=0.62V
[21:31:28][D][sensor:092]: 'Testing Brightness': Sending state 124.63981 lux with 2 decimals of accuracy
[21:31:29][D][adc:056]: 'Testing Brightness': Got voltage=0.20V
[21:31:29][D][sensor:092]: 'Testing Brightness': Sending state 40.40049 lux with 2 decimals of accuracy
[21:31:30][D][adc:056]: 'Testing Brightness': Got voltage=0.74V
[21:31:30][D][sensor:092]: 'Testing Brightness': Sending state 147.25764 lux with 2 decimals of accuracy
[21:31:31][D][adc:056]: 'Testing Brightness': Got voltage=0.42V
[21:31:31][D][sensor:092]: 'Testing Brightness': Sending state 84.18559 lux with 2 decimals of accuracy
[21:31:32][D][adc:056]: 'Testing Brightness': Got voltage=0.00V
[21:31:32][D][sensor:092]: 'Testing Brightness': Sending state 0.00000 lux with 2 decimals of accuracy
[21:31:33][D][adc:056]: 'Testing Brightness': Got voltage=0.81V
[21:31:33][D][sensor:092]: 'Testing Brightness': Sending state 162.51527 lux with 2 decimals of accuracy
[21:31:34][D][adc:056]: 'Testing Brightness': Got voltage=0.66V
[21:31:34][D][sensor:092]: 'Testing Brightness': Sending state 132.96704 lux with 2 decimals of accuracy
[21:31:35][D][adc:056]: 'Testing Brightness': Got voltage=0.36V
[21:31:35][D][sensor:092]: 'Testing Brightness': Sending state 71.07693 lux with 2 decimals of accuracy
[21:31:36][D][adc:056]: 'Testing Brightness': Got voltage=0.00V
[21:31:36][D][sensor:092]: 'Testing Brightness': Sending state 0.00000 lux with 2 decimals of accuracy
[21:31:37][D][adc:056]: 'Testing Brightness': Got voltage=0.30V
[21:31:37][D][sensor:092]: 'Testing Brightness': Sending state 60.17094 lux with 2 decimals of accuracy
[21:31:38][D][adc:056]: 'Testing Brightness': Got voltage=0.51V
[21:31:38][D][sensor:092]: 'Testing Brightness': Sending state 102.66666 lux with 2 decimals of accuracy
[21:31:39][D][adc:056]: 'Testing Brightness': Got voltage=0.06V
[21:31:39][D][sensor:092]: 'Testing Brightness': Sending state 12.35653 lux with 2 decimals of accuracy
[21:31:39][D][sensor:092]: 'Testing uptime do not use': Sending state 54.76800 s with 0 decimals of accuracy
[21:31:39][D][text_sensor:015]: 'Testing Uptime': Sending state '0d 00h 00m 54s'
[21:31:40][D][adc:056]: 'Testing Brightness': Got voltage=0.00V
[21:31:40][D][sensor:092]: 'Testing Brightness': Sending state 0.00000 lux with 2 decimals of accuracy
[21:31:41][D][adc:056]: 'Testing Brightness': Got voltage=0.24V
[21:31:41][D][sensor:092]: 'Testing Brightness': Sending state 48.62027 lux with 2 decimals of accuracy
[21:31:42][D][adc:056]: 'Testing Brightness': Got voltage=0.79V
[21:31:42][D][sensor:092]: 'Testing Brightness': Sending state 158.64713 lux with 2 decimals of accuracy
in this instance the sensor was in a dimly lit room, but I get similar readings if I put the sensor in a box void of any light or under a lamp and pointing directly at the sensor.
Are you providing exactly 3 Volts? Maybe that isn’t enough for the sensor to provide stable readings. I would up the voltage to at least 3.3V (maybe utilize an output pin from the esp32 as your voltage source assuming it can supply sufficient current for the sensor.
my apologies for not being clear above, all the points of the sensor are connected using dupont from the sensor to the ESP32 board so the sensor is recieving 3.3V from the board with is being powered via usb cable which is plugged into a plug in the wall and rated to 5v 2a DC
my thought was that either i have something wrong in my configuration or the power source us pulsing the power, but then how do i check that?
If you’re taking it from the pin labeled 3.3V that is input only. That would explain your sensor readings blowing in the breeze. Basically no power to the circuit hence noise only which is what you are seeing.
All the sensors should have a spec sheet. You’ll typically want to note max current draws (worse case scenario) for sizing hardware.
Regarding the software, Most of my code is written in lambdas utilizing c++ . I find it easier to code things up that way. I’ve picked up a lot of knowledge by perusing the open source code for this project and the online manual. Unfortunately it just takes time there is no magic brain dump.
If you don’t have anything connected to 2 put the power on that pin. The blue led will at least show you that you have power going to the circuit. Then I would recheck your connections as your results still looks like noise. Unless you have a voltmeter then check the voltages on the sensor.