Skip to content
Calvin Hass edited this page May 17, 2020 · 5 revisions

Tips & Tricks with GUIslice

This page is under development. Please check back again later!

External GUI control

Navigating pages with an Encoder

  // Detect encoder transition events
  bool bInc = false;
  bool bDec = false;  
  int32_t newPosition = myEnc.read();
  if (newPosition != oldPosition) {
    if (newPosition > oldPosition) { bInc = true; }
    else { bDec = true; }
    oldPosition = newPosition;
  }
  if (bInc) { // Increment
    m_nCurPage = (m_nCurPage < MAX_PAGE-1)? m_nCurPage+1 : m_nCurPage;
    gslc_SetPageCur(&m_gui,m_nCurPage);    
  } else if (bDec) { // Decrement
    m_nCurPage = (m_nCurPage > 0)? m_nCurPage-1 : m_nCurPage;
    gslc_SetPageCur(&m_gui,m_nCurPage);    
  }

Font Handling

TBD - list of font support options per driver / platform

Platform-specific Requirements

ESP32

  • All examples require #include "Arduino.h" in their header in order for ESP32 to work. (Thanks to @shafr)
Clone this wiki locally