Skip to content

Commit

Permalink
Update Example_Fast_Temperature.ino
Browse files Browse the repository at this point in the history
Ported to Arduino core for RP2040 
Replaced not supported printf() by print()
  • Loading branch information
rei-vilo authored Jan 19, 2024
1 parent b7c8e39 commit 108a0d2
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions examples/Example_Fast_Temperature/Example_Fast_Temperature.ino
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
/// @details Library for Pervasive Displays EXT3 - Basic level
///
/// @author Rei Vilo
/// @date 21 Dec 2023
/// @version 703
/// @date 21 Jan 2024
/// @version 704
///
/// @copyright (c) Rei Vilo, 2010-2023
/// @copyright Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
Expand Down Expand Up @@ -34,7 +34,7 @@


// 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_266_0C_Fast, boardRaspberryPiPico_RP2040);
// Screen_EPD_EXT3_Fast myScreen(eScreen_EPD_EXT3_271_09_Wide, boardRaspberryPiPico_RP2040);

// Prototypes
Expand All @@ -47,7 +47,12 @@ 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.print("Temperature= ");
Serial.print(temperatureC);
Serial.print(" C - Mode: ");
Serial.print(stringMode[expectedMode]);
Serial.print(" -> ");
Serial.print(stringMode[recommendedMode]);
Serial.println();
}

Expand All @@ -69,6 +74,7 @@ void performTest()
void setup()
{
Serial.begin(115200);
delay(5000);

Serial.println();
Serial.println("=== " __FILE__);
Expand Down

0 comments on commit 108a0d2

Please sign in to comment.