Skip to content

Manage temperature

The temperature management allows to set the temperature and adapt the refresh mode.

Warning

The temperature management requires a screen with embedded fast update, optionally wide temperature, and the PDLS_EXT3_Advanced_Fast library.

Danger

Updating the screen outside the recommended temperature range may damage it irremediably.

Configure

#include "PDLS_EXT3_Advanced_Fast.h";

Ensure the screen is declared and initialised according to the configuration procedure.

Use

myScreen.setTemperatureC(25);
myScreen.setTemperatureF(77);

setTemperatureC() sets the temperature in degrees Celsius. Default value is 25 °C. setTemperatureF() sets the temperature in degrees Fahrenheit. Default value is 77 °F.

uint8_t mode = myScreen.checkTemperatureMode(UPDATE_FAST);

checkTemperatureMode() checks the compatibility of the update mode with the temperature based on the data-sheet of the screen.

If the update mode is not compatible with the temperature, the function downgrades the update mode to UPDATE_GLOBAL and tests it again.

Finally, the function returns the recommended mode or UPDATE_NONE if the temperature is out of range.

Series Code Feature Fast update Global update
Normal CS Monochrome
Global update
- ±0 to +50 °C
Fast PS Monochrome
Embedded fast update
+15 to +30 °C ±0 to +50 °C
Wide KS Monochrome
Wide temperature and embedded fast update
±0 to +50 °C -15 to +60 °C
Freezer HS Monochrome
Global update below ±0 °C
- -25 to +30 °C
Red JS Red colour
Global update
- ±0 to +40 °C
Red and yellow KS Red and yellow colours
Global update
- ±0 to +40 °C

Warning

Always refer to the data-sheets of the screens for the temperature ranges and the compatible modes.

uint8_t mode = myScreen.checkTemperatureMode(UPDATE_FAST);

flushMode() checks the compatibility of the update mode with the temperature, performs the refresh if possible and returns the mode.

If the temperature is out of range, the function does not refresh the screen and returns UPDATE_NONE.

Example

Here are some examples for the 3.70" type 0C screen with wide temperature and embedded fast update .

Temperature=  +70 C - Mode:     FAST -> NONE
Temperature=  +60 C - Mode:     FAST -> GLOBAL
Temperature=  +50 C - Mode:     FAST -> FAST
Temperature=  +25 C - Mode:     FAST -> FAST
Temperature=  -15 C - Mode:     FAST -> GLOBAL
Temperature=  -25 C - Mode:     FAST -> NONE

If the update mode is not compatible, the function tests global update mode. The function returns the recommended mode, or UPDATE_NONE if the temperature is out of range.

Screen_EPD_EXT3_Fast myScreen(eScreen_EPD_370_KS_0C, boardRaspberryPiPico_RP2040);

void check(int8_t temperatureC, uint8_t expectedMode)
{
    const char * stringMode[] = {"NONE", "GLOBAL", "FAST", "PARTIAL"};
    myScreen.setTemperatureC(temperatureC);
    uint8_t recommendedMode = myScreen.checkTemperatureMode(expectedMode);
    hV_HAL_log(LEVEL_INFO, "Temperature= %+3i C - Mode: %8s -> %-8s", temperatureC, stringMode[expectedMode], stringMode[recommendedMode]);
}

void performTest()
{
    check(+70, UPDATE_FAST);
    check(+60, UPDATE_FAST);
    check(+50, UPDATE_FAST);
    check(+25, UPDATE_FAST);
    check(-15, UPDATE_FAST);
    check(-25, UPDATE_FAST);
}