WIP
This commit is contained in:
@ -60,6 +60,7 @@ void app_main(void)
|
||||
i2c_new_master_bus(&i2c_bus_config, &i2c_bus_handle);
|
||||
#endif
|
||||
zh_bh1750_init_config_t bh1750_init_config = ZH_BH1750_INIT_CONFIG_DEFAULT();
|
||||
bh1750_init_config.auto_adjust = true; // Just for an example of how to enable auto adjustment the sensor sensitivity.
|
||||
#ifdef CONFIG_IDF_TARGET_ESP8266
|
||||
bh1750_init_config.i2c_port = I2C_PORT;
|
||||
#else
|
||||
@ -72,7 +73,7 @@ void app_main(void)
|
||||
{
|
||||
zh_bh1750_read(&lux);
|
||||
printf("Lux %0.2f\n", lux);
|
||||
vTaskDelay(1000 / portTICK_PERIOD_MS);
|
||||
vTaskDelay(5000 / portTICK_PERIOD_MS);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
Reference in New Issue
Block a user