Skip to content

Commit

Permalink
Release 5.3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
rei-vilo committed Jul 4, 2022
1 parent 6d23396 commit a8a9f61
Show file tree
Hide file tree
Showing 16 changed files with 1,299 additions and 32 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ Doxyfile
docs/
latex/
xml/
img/
8 changes: 4 additions & 4 deletions README.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

![Arduino lint](https://github.com/rei-vilo/PDLS_EXT3_Basic_Touch/actions/workflows/main.yml/badge.svg)

Library for Pervasive Displays [EPD Extension Kit Gen 3 (EXT3-1 and EXT3-Touch)](https://www.pervasivedisplays.com/product/epd-extension-kit-gen-3-EXT3-Touch/) and iTC [monochrome touch](https://www.pervasivedisplays.com/product/2-71-e-ink-display-aurora-mb-v231/) screens with basic features
Library for Pervasive Displays [EPD Extension Kit Gen 3 (EXT3-Touch)](https://www.pervasivedisplays.com/product/epd-extension-kit-gen-3-EXT3-Touch/) and iTC [monochrome touch](https://www.pervasivedisplays.com/product/2-71-e-ink-display-aurora-mb-v231/) screens with basic features

Please refer to [PDLS_EXT3_Basic](https://github.com/rei-vilo/PDLS_EXT3_Basic/issues) for reporting issues.

Expand All @@ -12,9 +12,9 @@ Please refer to [PDLS_EXT3_Basic](https://github.com/rei-vilo/PDLS_EXT3_Basic/is
+ Text routines
+ Fast update
+ Touch management
- HMI library
+ GUI with button and text
+ Four extended fonts
+ Go to the [documentation](https://rei-vilo.github.io/PDLS_EXT3_Basic_Documentation/index.html)
+ Go to the [documentation](https://rei-vilo.github.io/PDLS_EXT3_Basic/index.html)

## Installation

Expand All @@ -39,7 +39,7 @@ Software

Hardware

* Pervasive Displays [EPD Extension Kit Gen 3 (EXT3-1 and EXT3-Touch)](https://www.pervasivedisplays.com/product/epd-extension-kit-gen-3-EXT3-Touch/)
* Pervasive Displays [EPD Extension Kit Gen 3 (EXT3-Touch)](https://www.pervasivedisplays.com/product/epd-extension-kit-gen-3-EXT3-Touch/)
* Pervasive Displays iTC [monochrome screens](https://www.pervasivedisplays.com/products/?_sft_etc_itc=itc&_sft_product_colour=black-white)

## Licence
Expand Down
186 changes: 186 additions & 0 deletions examples/Common_Colours/Common_Colours.ino
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
///
/// @file Common_Palette.ino
/// @brief Example of features for basic edition
///
/// @details Project Pervasive Displays Library Suite
/// @n Based on highView technology
///
/// @author Rei Vilo
/// @date 16 Aug 2021
/// @version 508
///
/// @copyright (c) Rei Vilo, 2010-2022
/// @copyright Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
///
/// @see ReadMe.txt for references
/// @n
///

// SDK
#if defined(ENERGIA) // LaunchPad specific
#include "Energia.h"
#else // Arduino general
#include "Arduino.h"
#endif // end IDE

// Set parameters

// Include application, user and local libraries
#include "SPI.h"
#include "PDLS_EXT3_Basic.h"

// Define structures and classes

// Define variables and constants
// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_154, boardLaunchPad);
// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_213, boardLaunchPad);
// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_266, boardLaunchPad);
// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_271, boardLaunchPad);
// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_287, boardLaunchPad);
Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_370, boardLaunchPad);
// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_417, boardLaunchPad);
// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_437, boardLaunchPad);
// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_565, boardLaunchPad);
// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_581, boardLaunchPad);
// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_741, boardLaunchPad);
// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_969, boardLaunchPad);
// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_B98, boardLaunchPad);

// Prototypes

// Utilities
///
/// @brief Wait with countdown
/// @param second duration, s
///
void wait(uint8_t second)
{
for (uint8_t i = second; i > 0; i--)
{
Serial.print(formatString(" > %i \r", i));
delay(1000);
}
Serial.print(" \r");
}


// Functions
///
/// @brief Palette test screen
/// @param flag true = default = perform flush, otherwise no
///
/// @image html T2_PALET.jpg
/// @image latex T2_PALET.PDF width=10cm
///
void displayPalette(bool flag = true)
{
myScreen.setOrientation(7);

uint16_t x0, y0, dx, dy, maxSize, colour;
maxSize = min((myScreen.screenSizeX() * 10 / 50), (myScreen.screenSizeY() * 10 / 35));
dx = (myScreen.screenSizeX() - maxSize * 50 / 10) / 2;
dy = (myScreen.screenSizeY() - maxSize * 35 / 10) / 2;

y0 = dy + maxSize / 2;
x0 = dx + maxSize / 2;
myScreen.dRectangle(x0 - 2, y0 - 2, maxSize + 4, maxSize + 4, myColours.red);
x0 = dx + maxSize * 4 / 2;
myScreen.dRectangle(x0 - 2, y0 - 2, maxSize + 4, maxSize + 4, myColours.red);
x0 = dx + maxSize * 7 / 2;
myScreen.dRectangle(x0 - 2, y0 - 2, maxSize + 4, maxSize + 4, myColours.red);

y0 = dy + maxSize * 4 / 2;
x0 = dx + maxSize / 2;
myScreen.dRectangle(x0 - 2, y0 - 2, maxSize + 4, maxSize + 4, myColours.black);
x0 = dx + maxSize * 4 / 2;
myScreen.dRectangle(x0 - 2, y0 - 2, maxSize + 4, maxSize + 4, myColours.black);
x0 = dx + maxSize * 7 / 2;
myScreen.dRectangle(x0 - 2, y0 - 2, maxSize + 4, maxSize + 4, myColours.black);

myScreen.setPenSolid();
myScreen.selectFont(Font_Terminal6x8);

x0 = dx + maxSize / 2;
y0 = dy + maxSize / 2;
// Light red
myScreen.dRectangle(x0, y0, maxSize, maxSize, myColours.lightRed);
myScreen.gText(x0, y0 + maxSize + 6, "light", myColours.red);

x0 = dx + maxSize * 4 / 2;
y0 = dy + maxSize / 2;
// Red
myScreen.dRectangle(x0, y0, maxSize, maxSize, myColours.red);
myScreen.gText(x0, y0 + maxSize + 6, "red", myColours.red);

x0 = dx + maxSize * 7 / 2;
y0 = dy + maxSize / 2;
// Dark-red
myScreen.dRectangle(x0, y0, maxSize, maxSize, myColours.darkRed);
myScreen.gText(x0, y0 + maxSize + 6, "dark", myColours.red);

x0 = dx + maxSize / 2;
y0 = dy + maxSize * 4 / 2;
// White
myScreen.dRectangle(x0, y0, maxSize, maxSize, myColours.white);
myScreen.gText(x0, y0 + maxSize + 6, "white", myColours.black);

x0 = dx + maxSize * 4 / 2;
y0 = dy + maxSize * 4 / 2;
// Grey
myScreen.dRectangle(x0, y0, maxSize, maxSize, myColours.grey);
myScreen.gText(x0, y0 + maxSize + 6, "grey", myColours.black);

x0 = dx + maxSize * 7 / 2;
y0 = dy + maxSize * 4 / 2;
// Black
myScreen.dRectangle(x0, y0, maxSize, maxSize, myColours.black);
myScreen.gText(x0, y0 + maxSize + 6, "black", myColours.black);

myScreen.selectFont(Font_Terminal8x12);
myScreen.gText(0, 0, myScreen.WhoAmI(), myColours.black);

myScreen.flush();
}

// Add setup code
///
/// @brief Setup
///
void setup()
{
Serial.begin(115200);
delay(500);
Serial.println();
Serial.println("=== " __FILE__);
Serial.println("=== " __DATE__ " " __TIME__);
Serial.println();

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

Serial.print("Palettes... ");
myScreen.clear();
displayPalette();
wait(8);

Serial.print("White... ");
myScreen.clear();
myScreen.flush();

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

#if defined(ARDUINO_ARCH_PIDUINO)
exit(0);
#endif
}

// Add loop code
///
/// @brief Loop, empty
///
void loop()
{
delay(1000);
}
157 changes: 157 additions & 0 deletions examples/Common_Fonts/Common_Fonts.ino
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
///
/// @file Common_Palette.ino
/// @brief Example of features for basic edition
///
/// @details Project Pervasive Displays Library Suite
/// @n Based on highView technology
///
/// @author Rei Vilo
/// @date 16 Aug 2021
/// @version 508
///
/// @copyright (c) Rei Vilo, 2010-2022
/// @copyright Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
///
/// @see ReadMe.txt for references
/// @n
///

// SDK
#if defined(ENERGIA) // LaunchPad specific
#include "Energia.h"
#else // Arduino general
#include "Arduino.h"
#endif // end IDE

// Set parameters

// Include application, user and local libraries
#include "SPI.h"
#include "PDLS_EXT3_Basic.h"

// Define structures and classes

// Define variables and constants
// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_154, boardLaunchPad);
// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_213, boardLaunchPad);
// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_266, boardLaunchPad);
// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_271, boardLaunchPad);
// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_287, boardLaunchPad);
Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_370, boardLaunchPad);
// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_417, boardLaunchPad);
// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_437, boardLaunchPad);
// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_565, boardLaunchPad);
// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_581, boardLaunchPad);
// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_741, boardLaunchPad);
// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_969, boardLaunchPad);
// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_B98, boardLaunchPad);

// Prototypes

// Utilities
///
/// @brief Wait with countdown
/// @param second duration, s
///
void wait(uint8_t second)
{
for (uint8_t i = second; i > 0; i--)
{
Serial.print(formatString(" > %i \r", i));
delay(1000);
}
Serial.print(" \r");
}


// Functions
///
/// @brief Fonts test screen
/// @param flag true = default = perform flush, otherwise no
///
/// @image html T2_FONTS..jpg
/// @image latex T2_FONTS.PDF width=10cm
///
void displayFonts(bool flag = true)
{
uint16_t y = 10;
myScreen.setOrientation(7);

// #if (USE_FONT_MODE == USE_FONT_TERMINAL)
myScreen.selectFont(Font_Terminal12x16);

myScreen.gText(10, y, myScreen.WhoAmI(), myColours.red);
y += myScreen.characterSizeY();
myScreen.gText(10, y, formatString("%i x %i", myScreen.screenSizeX(), myScreen.screenSizeY()), myColours.red);
y += myScreen.characterSizeY();
y += myScreen.characterSizeY();

myScreen.selectFont(Font_Terminal6x8);
myScreen.gText(10, y, "Terminal6x8");
y += myScreen.characterSizeY();

myScreen.selectFont(Font_Terminal8x12);
myScreen.gText(10, y, "Terminal8x12");
y += myScreen.characterSizeY();

myScreen.selectFont(Font_Terminal12x16);
myScreen.gText(10, y, "Terminal12x16");
y += myScreen.characterSizeY();

myScreen.selectFont(Font_Terminal16x24);
myScreen.gText(10, y, "Terminal16x24");
y += myScreen.characterSizeY();

// #elif (USE_FONT_MODE == USE_FONT_HEADER)
//
// #elif (USE_FONT_MODE == USE_FONT_FLASH)
//
// #else
// #error USE_FONT_MODE not defined
// #endif

myScreen.flush();
}

// Add setup code
///
/// @brief Setup
///
void setup()
{
Serial.begin(115200);
delay(500);
Serial.println();
Serial.println("=== " __FILE__);
Serial.println("=== " __DATE__ " " __TIME__);
Serial.println();

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

Serial.print("Fonts... ");
myScreen.clear();
displayFonts();
wait(8);

Serial.print("White... ");
myScreen.clear();
myScreen.flush();

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

#if defined(ARDUINO_ARCH_PIDUINO)
exit(0);
#endif
}

// Add loop code
///
/// @brief Loop, empty
///
void loop()
{
delay(1000);
}
Loading

0 comments on commit a8a9f61

Please sign in to comment.