Browse Source

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.
Robert F-C 11 years ago
parent
commit
9322c408c6
3 changed files with 10 additions and 11 deletions
  1. 8
    6
      Marlin/Configuration.h
  2. 0
    3
      Marlin/Marlin.pde
  3. 2
    2
      Marlin/ultralcd_implementation_hitachi_HD44780.h

+ 8
- 6
Marlin/Configuration.h View File

348
   #define ULTIPANEL 
348
   #define ULTIPANEL 
349
 #endif
349
 #endif
350
 
350
 
351
-//PANELOLU2 LCD with status LEDs, separate encoder and click inputs
351
+// PANELOLU2 LCD with status LEDs, separate encoder and click inputs
352
 //#define LCD_I2C_PANELOLU2
352
 //#define LCD_I2C_PANELOLU2
353
 #ifdef LCD_I2C_PANELOLU2
353
 #ifdef LCD_I2C_PANELOLU2
354
-  // This uses the LiquidTWI2 library ( https://github.com/lincomatic/LiquidTWI2 )
355
-  // Make sure it is placed in the Arduino or Sketchbook libraries directory.
354
+  // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
355
+  // Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
356
+  // (v1.2.3 no longer requires you to define PANELOLU in the LiquidTWI2.h library header file)
356
   // Note: The PANELOLU2 encoder click input can either be directly connected to a pin 
357
   // Note: The PANELOLU2 encoder click input can either be directly connected to a pin 
357
   //       (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1). 
358
   //       (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1). 
358
   #define LCD_I2C_TYPE_MCP23017
359
   #define LCD_I2C_TYPE_MCP23017
362
   #define ULTIPANEL 
363
   #define ULTIPANEL 
363
 #endif
364
 #endif
364
 
365
 
365
-//Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs
366
+// Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs
366
 //#define LCD_I2C_VIKI
367
 //#define LCD_I2C_VIKI
367
 #ifdef LCD_I2C_VIKI
368
 #ifdef LCD_I2C_VIKI
368
-  // This uses the LiquidTWI2 library ( https://github.com/lincomatic/LiquidTWI2 )
369
-  // Make sure it is placed in the Arduino or Sketchbook libraries directory.
369
+  // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
370
+  // Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
370
   // Note: The pause/stop/resume LCD button pin should be connected to the Arduino
371
   // Note: The pause/stop/resume LCD button pin should be connected to the Arduino
371
   //       BTN_ENC pin (or set BTN_ENC to -1 if not used)
372
   //       BTN_ENC pin (or set BTN_ENC to -1 if not used)
372
   #define LCD_I2C_TYPE_MCP23017 
373
   #define LCD_I2C_TYPE_MCP23017 
373
   #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
374
   #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
375
+  #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD (requires LiquidTWI2 v1.2.3 or later)
374
   #define NEWPANEL
376
   #define NEWPANEL
375
   #define ULTIPANEL 
377
   #define ULTIPANEL 
376
 #endif
378
 #endif

+ 0
- 3
Marlin/Marlin.pde View File

40
   #elif defined(LCD_I2C_TYPE_MCP23017) || defined(LCD_I2C_TYPE_MCP23008)
40
   #elif defined(LCD_I2C_TYPE_MCP23017) || defined(LCD_I2C_TYPE_MCP23008)
41
     #include <Wire.h>
41
     #include <Wire.h>
42
     #include <LiquidTWI2.h>
42
     #include <LiquidTWI2.h>
43
-    #if defined(LCD_I2C_PANELOLU2) && !defined(PANELOLU2)
44
-      #error You must uncomment "#define PANELOLU2" in LiquidTWI2.h for LiquidTWI2.cpp to compile correctly
45
-    #endif
46
   #else
43
   #else
47
     #include <LiquidCrystal.h>
44
     #include <LiquidCrystal.h>
48
   #endif
45
   #endif

+ 2
- 2
Marlin/ultralcd_implementation_hitachi_HD44780.h View File

54
   #define LCD_HAS_SLOW_BUTTONS
54
   #define LCD_HAS_SLOW_BUTTONS
55
 
55
 
56
 #elif defined(LCD_I2C_PANELOLU2)
56
 #elif defined(LCD_I2C_PANELOLU2)
57
+  // encoder click can be read through I2C if not directly connected
57
   #if !defined(BTN_ENC) || BTN_ENC == -1 
58
   #if !defined(BTN_ENC) || BTN_ENC == -1 
58
-    // encoder click is connected through I2C (rather than directly connected)
59
     #define B_I2C_BTN_OFFSET 3 // (the first three bit positions reserved for EN_A, EN_B, EN_C)
59
     #define B_I2C_BTN_OFFSET 3 // (the first three bit positions reserved for EN_A, EN_B, EN_C)
60
   
60
   
61
-    #define B_MI (ENCODER_C<<B_I2C_BTN_OFFSET)
61
+    #define B_MI (PANELOLU2_ENCODER_C<<B_I2C_BTN_OFFSET) // requires LiquidTWI2 library v1.2.3 or later
62
 
62
 
63
     #define LCD_CLICKED (buttons&B_MI)
63
     #define LCD_CLICKED (buttons&B_MI)
64
 
64
 

Loading…
Cancel
Save