default

Example of the component esp-idf-lib/veml7700 v1.0.5
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-S2 | ESP32-S3 |
| ----------------- | ----- | -------- | -------- | -------- | -------- |

# VEML7700 Example

Configures an I2C attached VEML7700 ambient light sensor and then reads the values
every 1.2 seconds.

## How to use example

Follow detailed instructions provided specifically for this example. 

Select the instructions depending on Espressif chip installed on your development board:

- [ESP32 Getting Started Guide](https://docs.espressif.com/projects/esp-idf/en/stable/get-started/index.html)
- [ESP32-S2 Getting Started Guide](https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/get-started/index.html)

Use `idf.py menuconfig` to adapt the pin configuration to your setup. 

## Example folder contents

The project **example-veml7700-i2c** contains one source file in C language [main.c](main/main.c). The file is located in folder [main](main).

ESP-IDF projects are built using CMake. The project build configuration is contained in `CMakeLists.txt` files that provide set of directives and instructions describing the project's source files and targets (executable, library, or both). 

Besides, using make is also supported up to esp-idf 4.x and will opt out in 5.x

Below is short explanation of remaining files in the project folder.

```
├── CMakeLists.txt
├── Makefile
├── main
│   ├── CMakeLists.txt
|   ├── components.mk
|   ├── Kconfig.projbuild      This is the project configuration for menuconfig
│   └── main.c
└── README.md                  This is the file you are currently reading
```

For more information on structure and contents of ESP-IDF projects, please refer to Section [Build System](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/build-system.html) of the ESP-IDF Programming Guide.

## Troubleshooting

* Program upload failure

    * Hardware connection is not correct: run `idf.py -p PORT monitor`, and reboot your board to see if there are any output logs.
    * The baud rate for downloading is too high: lower your baud rate in the `menuconfig` menu, and try again.

To create a project from this example, run:

idf.py create-project-from-example "esp-idf-lib/veml7700=1.0.5:default"

or download archive (~4.48 KB)