Troubleshooting

Sen 0390

userHead Zaki Naufal.Maulana 2023-07-25 12:20:27 322 Views8 Replies

Why my Ambient Light Sensor SEN 0390, the ouput it just -1.00

2023-07-25 20:53:15

This is my variabel luxx for the lux meter, but still get -1.00

void luxx(){

  float l = myLux.lightStrengthLux();

  Serial.print("value: ");

  Serial.print(l);

  Serial.println(" (lux).");

  Blynk.virtualWrite(V1, l);

  delay(1000);

}

 

i already put the myLux in setup and the luxx in loop

userHeadPic Zaki Naufal.Maulana
2023-07-25 15:29:18

According to the SEN0390 library, the code could work with the ESP32

https://github.com/DFRobot/DFRobot_B_LUX_V30B

 

 

https://www.esp32.com/viewtopic.php?t=4742#p20511

You could use this I2C scanner to check if it's connect properly

 

And could you tell me your wire connection?

Like how you which PIN you connect the sensor to the ESP32.

userHeadPic Yeez_B
Zaki Naufal.Maulana wrote:

Im using pin 13 for enable, vcc to vin, gnd to gnd, sda to pin 21, and scl to pin 22

2023-07-25 15:38:35
Zaki Naufal.Maulana wrote:

This is my variabel luxx for the lux meter, but still get -1.00

void luxx(){

  float l = myLux.lightStrengthLux();

  Serial.print("value: ");

  Serial.print(l);

  Serial.println(" (lux).");

  Blynk.virtualWrite(V1, l);

  delay(1000);

}

 

i already put the myLux in setup and the luxx in loop

2023-07-26 09:38:18
2 Replies
2023-07-25 13:49:41

Could you put your code, wire diagram here and tell us what kind of main baord you are using?

 

If you are using the Arduino, you could upload the I2C scanner to see if your SEN0390 is hooked up properly onto your main board.

https://github.com/luisllamasbinaburo/Arduino-I2CScanner

userHeadPic Yeez_B
Zaki Naufal.Maulana wrote:

I use esp32, its same things or not? For code i use some example from library 

 

2023-07-25 14:00:40
jenna wrote:

Hi!

 

pls try this code.

 

ESP32 - I2C Scanner using Arduino IDE (working) - ESP32 Forum

2023-07-25 16:25:51
Yeez_B wrote:

https://www.esp32.com/viewtopic.php?t=4742

2023-07-25 17:46:57
3 Replies