Comments: Qwiic Ambient Light Sensor (VEML6030) Hookup Guide
Looking for answers to technical questions?
We welcome your comments and suggestions below. However, if you are looking for solutions to technical questions please see our Technical Assistance page.
If you've found an issue with this tutorial content, please send us your feedback!
My dear friend i have a problem with your examples for this sensor. i use a Sparkfun ESP32 thing plus and this veml6030 and Arduino 1.8.19 and everytime for all your examples i recieved when i try to upload this error "'int time' redeclared as different kind of symbol" for the line: "int time = 100;" What can i do? This is all the error message received:
Example1_Read_Ambient_Basics:38:5: error: 'int time' redeclared as different kind of symbol int time = 100; ^ In file included from C:\Users\Niculescu Robert\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6/tools/sdk/include/newlib/stdio.h:29:0, from C:\Users\Niculescu Robert\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Arduino.h:27, from sketch\Example1_Read_Ambient_Basics.ino.cpp:1: C:\Users\Niculescu Robert\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6/tools/sdk/include/newlib/time.h:53:11: note: previous declaration 'time_t time(time_t)' time_t _EXFUN(time, (time_t *_timer)); ^ C:\Users\NICULE~1\AppData\Local\Temp\arduino_modified_sketch_970837\Example1_Read_Ambient_Basics.ino: In function 'void setup()': Example1_Read_Ambient_Basics:55:26: error: invalid conversion from 'time_t ()(time_t) {aka long int ()(long int*)}' to 'uint16_t {aka short unsigned int}' [-fpermissive] light.setIntegTime(time); ^ In file included from C:\Users\NICULE~1\AppData\Local\Temp\arduino_modified_sketch_970837\Example1_Read_Ambient_Basics.ino:24:0: C:\Users\Niculescu Robert\Documents\Arduino\libraries\SparkFun_Ambient_Light_Sensor_Arduino_Library-1.0.3\src/SparkFun_VEML6030_Ambient_Light_Sensor.h:95:10: note: initializing argument 1 of 'void SparkFun_Ambient_Light::setIntegTime(uint16_t)' void setIntegTime(uint16_t time); ^ exit status 1 'int time' redeclared as different kind of symbol