Skip to content

Commit

Permalink
Added Example_Fast_Temperature
Browse files Browse the repository at this point in the history
  • Loading branch information
rei-vilo committed Dec 11, 2023
1 parent ea9d3b6 commit b7c8e39
Show file tree
Hide file tree
Showing 3 changed files with 99 additions and 4 deletions.
95 changes: 95 additions & 0 deletions examples/Example_Fast_Temperature/Example_Fast_Temperature.ino
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
///
/// @file Example_Fast_Temperature.ino
/// @brief Example of features for fast edition
///
/// @details Library for Pervasive Displays EXT3 - Basic level
///
/// @author Rei Vilo
/// @date 21 Dec 2023
/// @version 703
///
/// @copyright (c) Rei Vilo, 2010-2023
/// @copyright Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
///
/// @see ReadMe.txt for references
/// @n
///

// Screen
#include "PDLS_EXT3_Basic_Fast.h"

// SDK
// #include <Arduino.h>
#include "hV_HAL_Peripherals.h"

// Include application, user and local libraries
// #include <SPI.h>

// Configuration
#include "hV_Configuration.h"

// Set parameters

// Define structures and classes


// Define variables and constants
Screen_EPD_EXT3_Fast myScreen(eScreen_EPD_EXT3_271_09_Fast, boardRaspberryPiPico_RP2040);
// Screen_EPD_EXT3_Fast myScreen(eScreen_EPD_EXT3_271_09_Wide, boardRaspberryPiPico_RP2040);

// Prototypes

// Utilities

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

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);
}

// Add setup code
///
/// @brief Setup
///
void setup()
{
Serial.begin(115200);

Serial.println();
Serial.println("=== " __FILE__);
Serial.println("=== " __DATE__ " " __TIME__);
Serial.println();

myScreen.begin();

Serial.println(formatString("=== %s %ix%i", myScreen.WhoAmI().c_str(), myScreen.screenSizeX(), myScreen.screenSizeY()));

performTest();

Serial.println("=== ");
Serial.println();
}

// Add loop code
///
/// @brief Loop, empty
///
void loop()
{
delay(1000);
}
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=PDLS_EXT3_Basic_Fast
version=7.0.2
version=7.0.3
author=Rei Vilo for Pervasive Displays
maintainer=Rei Vilo
sentence=Library for Pervasive Displays iTC monochrome screens with embedded fast update and EXT3-1 board
Expand Down
6 changes: 3 additions & 3 deletions src/hV_Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
/// * 11. Set storage mode, not implemented
///
/// @author Rei Vilo
/// @date 21 Nov 2023
/// @version 702
/// @date 21 Dec 2023
/// @version 703
///
/// @copyright (c) Rei Vilo, 2010-2023
/// @copyright All rights reserved
Expand Down Expand Up @@ -70,7 +70,7 @@
///
/// @brief Release
///
#define hV_CONFIGURATION_RELEASE 702
#define hV_CONFIGURATION_RELEASE 703

///
/// @name 1- List of supported Pervasive Displays screens
Expand Down

0 comments on commit b7c8e39

Please sign in to comment.