Vishay VEML6040 RGBW color sensor library for Arduino
Click here to learn more about the Vishay VEML6040 RGBW color sensor.
-
Connect the VEML6040 sensor to your Arduino board's standard I2C bus. Check the pinout of your Arduino board to find the correct pins.
Important: without additional level shifting the VEML6040 is not compatible with 5v Arduino boards
This breakout board has additional level shifting built in and can therefore be used with 5V Arduino boards.
- VIN of the VEML6040 to the 3.3V of your Arduino board (5V is also possible)
- GND of the VEML6040 to the GND of your Arduino board
- SCL of the VEML6040 to the SCL of your Arduino board
- SDA of the VEML6040 to the SDA of your Arduino board
-
Open the
auto_mode
sample project within the Arduino IDEFile => Examples => VEML6040 => auto_mode
-
Click the
Upload
button in the Arduino IDE orSketch => Upload
-
When the upload process has finished, open the
Serial Monitor
orSerial Plotter
via theTools
menu to observe the measured values. Note that theBaud Rate
in the corresponding window has to be set to9600 baud
.