This usermod will read from an attached photoresistor sensor like the KY-018 sensor.
The luminance is displayed both in the Info section of the web UI as well as published to the /luminance
MQTT topic if enabled.
Copy the example platformio_override.ini
to the root directory. This file should be placed in the same directory as platformio.ini
.
USERMOD_SN_PHOTORESISTOR
- define this to have this user mod included wled00\usermods_list.cppUSERMOD_SN_PHOTORESISTOR_MEASUREMENT_INTERVAL
- the number of milliseconds between measurements, defaults to 60 secondsUSERMOD_SN_PHOTORESISTOR_FIRST_MEASUREMENT_AT
- the number of milliseconds after boot to take first measurement, defaults to 20 secondsUSERMOD_SN_PHOTORESISTOR_REFERENCE_VOLTAGE
- the voltage supplied to the sensor, defaults to 5vUSERMOD_SN_PHOTORESISTOR_ADC_PRECISION
- the ADC precision is the number of distinguishable ADC inputs, defaults to 1024.0 (10 bits)USERMOD_SN_PHOTORESISTOR_RESISTOR_VALUE
- the resistor size, defaults to 10000.0 (10K hms)USERMOD_SN_PHOTORESISTOR_OFFSET_VALUE
- the offset value to report on, defaults to 25All parameters can be configured at runtime using Usermods settings page.
If you are using platformio_override.ini
, you should be able to refresh the task list and see your custom task, for example env:usermod_sn_photoresistor_d1_mini
.
Вы можете оставить комментарий после Вход в систему
Неприемлемый контент может быть отображен здесь и не будет показан на странице. Вы можете проверить и изменить его с помощью соответствующей функции редактирования.
Если вы подтверждаете, что содержание не содержит непристойной лексики/перенаправления на рекламу/насилия/вульгарной порнографии/нарушений/пиратства/ложного/незначительного или незаконного контента, связанного с национальными законами и предписаниями, вы можете нажать «Отправить» для подачи апелляции, и мы обработаем ее как можно скорее.
Опубликовать ( 0 )