Commits

F Malpartida committed 19a2689

Added support in examples for SR3W.

Comments (0)

Files changed (2)

examples/i2cLCDextraIO_tempLeonardo/i2cLCDextraIO_tempLeonardo.ino

 #include <Wire.h>
 #include <LCD.h>
 
-#define _LCD_I2C_
+#define _LCD_SR3W_
 
 #ifdef _LCD_I2C_
 #include <LiquidCrystal_I2C.h>
 #include <LiquidCrystal.h>
 #endif
 
+
 #ifdef _LCD_SR_
 #include <LiquidCrystal_SR.h>
 #endif
 
+#ifdef _LCD_SR3W_
+#include <LiquidCrystal_SR3W.h>
+#endif
+
 
 /*!
     @defined    CHAR_WIDTH
 //                   \---- Data/Enable Pin
 #endif
 
+#ifdef _LCD_SR3W_
+LiquidCrystal_SR3W lcd(3, 2, 4);
+//                     | |
+//                     | \-- Clock Pin
+//                     \---- Data/Enable Pin
+#endif
+
+
 // LCD reference variable
 LCD *myLCD = &lcd;
 
 #ifdef _LCD_I2C_
    pinMode ( BACKLIGHT_PIN, OUTPUT );
    digitalWrite (BACKLIGHT_PIN, HIGH);
-#else
-   myLCD->backlight();
 #endif
    pinMode ( STATUS_PIN, OUTPUT );
 
-   myLCD->begin ( 20, 4 );
+   myLCD->begin ( 20, 2 );
    // Load custom character set into CGRAM
    // --------------------------------------------------------------------
    for ( i = 0; i < charBitmapSize; i++ )

examples/performanceLCD/performanceLCD.pde

 // ---------------------------------------------------------------------------
 #include <Wire.h>
 
-#define _LCD_SR3W_
+#define _LCD_I2C_
 
 #ifdef _LCD_I2C_
 #include <LiquidCrystal_I2C.h>
 #endif
 
 #ifdef _LCD_SR3W_
-LiquidCrystal_SR3W lcd(4, 3, 2);
+LiquidCrystal_SR3W lcd(3, 2, 4);
 #endif
 
 // benchMarks definitions
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.