Updated for LiquidTWI2 library version 1.2.3
The new version of the library means that PANELOLU no longer needs to be defined in LiquidTWI.h (the library file can be used as is) and the new version of the library also enables the buzzer on the Panucatt VIKI panel.
This commit is contained in:
parent
7bad72359c
commit
9322c408c6
|
@ -351,8 +351,9 @@ const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of th
|
|||
// PANELOLU2 LCD with status LEDs, separate encoder and click inputs
|
||||
//#define LCD_I2C_PANELOLU2
|
||||
#ifdef LCD_I2C_PANELOLU2
|
||||
// This uses the LiquidTWI2 library ( https://github.com/lincomatic/LiquidTWI2 )
|
||||
// Make sure it is placed in the Arduino or Sketchbook libraries directory.
|
||||
// This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
|
||||
// Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
|
||||
// (v1.2.3 no longer requires you to define PANELOLU in the LiquidTWI2.h library header file)
|
||||
// Note: The PANELOLU2 encoder click input can either be directly connected to a pin
|
||||
// (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1).
|
||||
#define LCD_I2C_TYPE_MCP23017
|
||||
|
@ -365,12 +366,13 @@ const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of th
|
|||
// Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs
|
||||
//#define LCD_I2C_VIKI
|
||||
#ifdef LCD_I2C_VIKI
|
||||
// This uses the LiquidTWI2 library ( https://github.com/lincomatic/LiquidTWI2 )
|
||||
// Make sure it is placed in the Arduino or Sketchbook libraries directory.
|
||||
// This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
|
||||
// Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
|
||||
// Note: The pause/stop/resume LCD button pin should be connected to the Arduino
|
||||
// BTN_ENC pin (or set BTN_ENC to -1 if not used)
|
||||
#define LCD_I2C_TYPE_MCP23017
|
||||
#define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
|
||||
#define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD (requires LiquidTWI2 v1.2.3 or later)
|
||||
#define NEWPANEL
|
||||
#define ULTIPANEL
|
||||
#endif
|
||||
|
|
|
@ -40,9 +40,6 @@
|
|||
#elif defined(LCD_I2C_TYPE_MCP23017) || defined(LCD_I2C_TYPE_MCP23008)
|
||||
#include <Wire.h>
|
||||
#include <LiquidTWI2.h>
|
||||
#if defined(LCD_I2C_PANELOLU2) && !defined(PANELOLU2)
|
||||
#error You must uncomment "#define PANELOLU2" in LiquidTWI2.h for LiquidTWI2.cpp to compile correctly
|
||||
#endif
|
||||
#else
|
||||
#include <LiquidCrystal.h>
|
||||
#endif
|
||||
|
|
|
@ -54,11 +54,11 @@ extern volatile uint8_t buttons; //the last checked buttons in a bit array.
|
|||
#define LCD_HAS_SLOW_BUTTONS
|
||||
|
||||
#elif defined(LCD_I2C_PANELOLU2)
|
||||
// encoder click can be read through I2C if not directly connected
|
||||
#if !defined(BTN_ENC) || BTN_ENC == -1
|
||||
// encoder click is connected through I2C (rather than directly connected)
|
||||
#define B_I2C_BTN_OFFSET 3 // (the first three bit positions reserved for EN_A, EN_B, EN_C)
|
||||
|
||||
#define B_MI (ENCODER_C<<B_I2C_BTN_OFFSET)
|
||||
#define B_MI (PANELOLU2_ENCODER_C<<B_I2C_BTN_OFFSET) // requires LiquidTWI2 library v1.2.3 or later
|
||||
|
||||
#define LCD_CLICKED (buttons&B_MI)
|
||||
|
||||
|
|
Loading…
Reference in a new issue