From 02435a78b17d5e456c65c9621f9a357a428276b8 Mon Sep 17 00:00:00 2001 From: Will Bradley Date: Tue, 29 Nov 2011 22:57:37 -0700 Subject: [PATCH] Updated readme; removed shiftlcd examples --- README.markdown | 4 + .../examples/Autoscroll/Autoscroll.pde | 89 --------------- .../ShiftLCD/examples/Backlight/Backlight.pde | 75 ------------- libraries/ShiftLCD/examples/Blink/Blink.pde | 75 ------------- .../examples/CreateChar/CreateChar.pde | 84 --------------- libraries/ShiftLCD/examples/Cursor/Cursor.pde | 76 ------------- .../ShiftLCD/examples/Display/Display.pde | 76 ------------- .../examples/HelloWorld/HelloWorld.pde | 74 ------------- libraries/ShiftLCD/examples/Scroll/Scroll.pde | 86 --------------- .../examples/SerialDisplay/SerialDisplay.pde | 81 -------------- .../examples/TextDirection/TextDirection.pde | 102 ------------------ .../ShiftLCD/examples/setCursor/setCursor.pde | 87 --------------- 12 files changed, 4 insertions(+), 905 deletions(-) delete mode 100644 libraries/ShiftLCD/examples/Autoscroll/Autoscroll.pde delete mode 100644 libraries/ShiftLCD/examples/Backlight/Backlight.pde delete mode 100644 libraries/ShiftLCD/examples/Blink/Blink.pde delete mode 100644 libraries/ShiftLCD/examples/CreateChar/CreateChar.pde delete mode 100644 libraries/ShiftLCD/examples/Cursor/Cursor.pde delete mode 100644 libraries/ShiftLCD/examples/Display/Display.pde delete mode 100644 libraries/ShiftLCD/examples/HelloWorld/HelloWorld.pde delete mode 100644 libraries/ShiftLCD/examples/Scroll/Scroll.pde delete mode 100644 libraries/ShiftLCD/examples/SerialDisplay/SerialDisplay.pde delete mode 100644 libraries/ShiftLCD/examples/TextDirection/TextDirection.pde delete mode 100644 libraries/ShiftLCD/examples/setCursor/setCursor.pde diff --git a/README.markdown b/README.markdown index 1a4cee4..9c15b66 100644 --- a/README.markdown +++ b/README.markdown @@ -12,6 +12,10 @@ Structure * Open Access Control folder * Open Access Control.pde (Arduino code -- open from the Arduino IDE.) * libraries folder (copy the contents of this folder to your Arduino program's libraries folder.) + * ShiftLCD folder + * keywords.txt + * ShiftLCD.cpp + * ShiftLCD.h * PCATTACH folder * keywords.txt * PCATTACH.cpp diff --git a/libraries/ShiftLCD/examples/Autoscroll/Autoscroll.pde b/libraries/ShiftLCD/examples/Autoscroll/Autoscroll.pde deleted file mode 100644 index dc92a52..0000000 --- a/libraries/ShiftLCD/examples/Autoscroll/Autoscroll.pde +++ /dev/null @@ -1,89 +0,0 @@ -/* - ShiftLCD Library - Autoscroll - - Demonstrates the use a 16x2 LCD display. The ShiftLCD library works with - all LCD displays that are compatible with the Hitachi HD44780 driver. - There are many of them out there, and you can usually tell them by the - 16-pin interface. - - This sketch demonstrates the use of the autoscroll() - and noAutoscroll() functions. - - The circuit: - - ---Shift Register 74HC595--- - * SR Pin 14 to Arduino pin 2 - * SR Pin 12 to Arduino pin 3 - * SR Pin 11 to Arduino pin 4 - * SR Pin 8 to Ground - * SR Pin 16 to +5v - * SR Pin 13 to Ground - * SR Pin 10 to +5v - -----Shift Reg to LCD-------- - * SR Pin 15 to D7 - * SR Pin 1 to D6 - * SR Pin 2 to D5 - * SR Pin 3 to D4 - * SR Pin 5 to MOSFET gate - * SR Pin 6 to Enable - * SR Pin 7 to RS - -----LCD HD44780------------- - * Vss to Ground - * Vdd to +5V - * Vo to 10k Wiper - * R/W to Ground - * 5v to +5v - * Gnd to MOSFET Drain - ------N Chanel MOSFET-------- - * Source to Ground - * Gate to SP Pin 5 - * Drain to LCD Gnd - * 1k Resistor Between gate and source - - For a more detailed schematic, please see my blog: - - http://cjparish.blogspot.com/2010/01/controlling-lcd-display-with-shift.html - - Library modified from the original LiquidCrystal Library - This example originaly by Tom Igoe, Jul 2009 - Example modified for use with ShiftLCD - Chris Parish, January 12th 2010 - - */ - -// include the library code: -#include - -// initialize the library with the numbers of the interface pins -ShiftLCD lcd(2, 4, 3); - -void setup() { - // set up the LCD's number of columns and rows: - lcd.begin(16,2); -} - -void loop() { - // set the cursor to (0,0): - lcd.setCursor(0, 0); - // print from 0 to 9: - for (int thisChar = 0; thisChar < 10; thisChar++) { - lcd.print(thisChar); - delay(500); - } - - // set the cursor to (16,1): - lcd.setCursor(16,1); - // set the display to automatically scroll: - lcd.autoscroll(); - // print from 0 to 9: - for (int thisChar = 0; thisChar < 10; thisChar++) { - lcd.print(thisChar); - delay(500); - } - // turn off automatic scrolling - lcd.noAutoscroll(); - - // clear screen for the next loop: - lcd.clear(); -} - diff --git a/libraries/ShiftLCD/examples/Backlight/Backlight.pde b/libraries/ShiftLCD/examples/Backlight/Backlight.pde deleted file mode 100644 index ec9d112..0000000 --- a/libraries/ShiftLCD/examples/Backlight/Backlight.pde +++ /dev/null @@ -1,75 +0,0 @@ -/* - ShiftLCD Library - Backlight - - Demonstrates the use a 16x2 LCD display. The ShiftLCD library works with - all LCD displays that are compatible with the Hitachi HD44780 driver. - There are many of them out there, and you can usually tell them by the - 16-pin interface. - - This sketch displays "Hello, World!" and then flashes the display - on and off once a second - - The circuit: - - ---Shift Register 74HC595--- - * SR Pin 14 to Arduino pin 2 - * SR Pin 12 to Arduino pin 3 - * SR Pin 11 to Arduino pin 4 - * SR Pin 8 to Ground - * SR Pin 16 to +5v - * SR Pin 13 to Ground - * SR Pin 10 to +5v - -----Shift Reg to LCD-------- - * SR Pin 15 to D7 - * SR Pin 1 to D6 - * SR Pin 2 to D5 - * SR Pin 3 to D4 - * SR Pin 5 to MOSFET gate - * SR Pin 6 to Enable - * SR Pin 7 to RS - -----LCD HD44780------------- - * Vss to Ground - * Vdd to +5V - * Vo to 10k Wiper - * R/W to Ground - * 5v to +5v - * Gnd to MOSFET Drain - ------N Chanel MOSFET-------- - * Source to Ground - * Gate to SP Pin 5 - * Drain to LCD Gnd - * 1k Resistor Between gate and source - - For a more detailed schematic, please see my blog: - - http://cjparish.blogspot.com/2010/01/controlling-lcd-display-with-shift.html - - Library modified from the original LiquidCrystal Library - Example by - Chris Parish, January 12th 2010 - - */ - -// include the library code: -#include - -// initalise the library with the numbers of the interface pins -ShiftLCD lcd(2,4,3); - -void setup() -{ - // set up the LCD's number of rows and columns: - lcd.begin(16,2); - // Output Hello, World! - lcd.print("Hello, World!"); -} - -void loop() -{ - // Turn the backlight on - lcd.backlightOn(); - delay(1000); - // Turn the backlight off - lcd.backlightOff(); - delay(1000); -} diff --git a/libraries/ShiftLCD/examples/Blink/Blink.pde b/libraries/ShiftLCD/examples/Blink/Blink.pde deleted file mode 100644 index 60c2805..0000000 --- a/libraries/ShiftLCD/examples/Blink/Blink.pde +++ /dev/null @@ -1,75 +0,0 @@ -/* - ShiftLCD Library - Blink - - Demonstrates the use a 16x2 LCD display. The ShiftLCD library works with - all LCD displays that are compatible with the Hitachi HD44780 driver. - There are many of them out there, and you can usually tell them by the - 16-pin interface. - - This sketch prints "Hello World!" and makes the cursor blink - - The circuit: - - ---Shift Register 74HC595--- - * SR Pin 14 to Arduino pin 2 - * SR Pin 12 to Arduino pin 3 - * SR Pin 11 to Arduino pin 4 - * SR Pin 8 to Ground - * SR Pin 16 to +5v - * SR Pin 13 to Ground - * SR Pin 10 to +5v - -----Shift Reg to LCD-------- - * SR Pin 15 to D7 - * SR Pin 1 to D6 - * SR Pin 2 to D5 - * SR Pin 3 to D4 - * SR Pin 5 to MOSFET gate - * SR Pin 6 to Enable - * SR Pin 7 to RS - -----LCD HD44780------------- - * Vss to Ground - * Vdd to +5V - * Vo to 10k Wiper - * R/W to Ground - * 5v to +5v - * Gnd to MOSFET Drain - ------N Chanel MOSFET-------- - * Source to Ground - * Gate to SP Pin 5 - * Drain to LCD Gnd - * 1k Resistor Between gate and source - - For a more detailed schematic, please see my blog: - - http://cjparish.blogspot.com/2010/01/controlling-lcd-display-with-shift.html - - Library modified from the original LiquidCrystal Library - This example originaly by Tom Igoe, Jul 2009 - Example modified for use with ShiftLCD - Chris Parish, January 12th 2010 - - */ - -// include the library code: -#include - -// initialize the library with the numbers of the interface pins -ShiftLCD lcd(2,4,3); - -void setup() { - // set up the LCD's number of rows and columns: - lcd.begin(16, 2); - // Print a message to the LCD. - lcd.print("hello, world!"); -} - -void loop() { - // Turn off the blinking cursor: - lcd.noBlink(); - delay(3000); - // Turn on the blinking cursor: - lcd.blink(); - delay(3000); -} - - diff --git a/libraries/ShiftLCD/examples/CreateChar/CreateChar.pde b/libraries/ShiftLCD/examples/CreateChar/CreateChar.pde deleted file mode 100644 index aed3125..0000000 --- a/libraries/ShiftLCD/examples/CreateChar/CreateChar.pde +++ /dev/null @@ -1,84 +0,0 @@ -/* - ShiftLCD Library - CreateChar - - Demonstrates the use a 16x2 LCD display. The ShiftLCD library works with - all LCD displays that are compatible with the Hitachi HD44780 driver. - There are many of them out there, and you can usually tell them by the - 16-pin interface. - - This sketch prints "Hello, World!" and then adds a smiley after it - - The circuit: - - ---Shift Register 74HC595--- - * SR Pin 14 to Arduino pin 2 - * SR Pin 12 to Arduino pin 3 - * SR Pin 11 to Arduino pin 4 - * SR Pin 8 to Ground - * SR Pin 16 to +5v - * SR Pin 13 to Ground - * SR Pin 10 to +5v - -----Shift Reg to LCD-------- - * SR Pin 15 to D7 - * SR Pin 1 to D6 - * SR Pin 2 to D5 - * SR Pin 3 to D4 - * SR Pin 5 to MOSFET gate - * SR Pin 6 to Enable - * SR Pin 7 to RS - -----LCD HD44780------------- - * Vss to Ground - * Vdd to +5V - * Vo to 10k Wiper - * R/W to Ground - * 5v to +5v - * Gnd to MOSFET Drain - ------N Chanel MOSFET-------- - * Source to Ground - * Gate to SP Pin 5 - * Drain to LCD Gnd - * 1k Resistor Between gate and source - - For a more detailed schematic, please see my blog: - - http://cjparish.blogspot.com/2010/01/controlling-lcd-display-with-shift.html - - Library modified from the original LiquidCrystal Library - Example based on the code from the arduino.cc reference library for LiquidCrystal - Chris Parish, January 17th 2010 - - */ - - //include the library code: - #include - - // initalise the library with the numbers of the interface pins - ShiftLCD lcd(2,4,3); - - //define the smiley - byte smiley[8] = { - B00000, - B10001, - B00000, - B00000, - B10001, - B01110, - B00000, - }; - - - void setup() - { - // create the character. This must be done before calling lcd.begin - lcd.createChar(0, smiley); - // initalise the display with the number of row and colums: - lcd.begin(16,2); - // output Hello World to the display: - lcd.print("Hello, World!"); - // output the custom character: - lcd.write(0); - } - - void loop() - { - } diff --git a/libraries/ShiftLCD/examples/Cursor/Cursor.pde b/libraries/ShiftLCD/examples/Cursor/Cursor.pde deleted file mode 100644 index 99181d1..0000000 --- a/libraries/ShiftLCD/examples/Cursor/Cursor.pde +++ /dev/null @@ -1,76 +0,0 @@ -/* - ShiftLCD Library - Cursor - - Demonstrates the use a 16x2 LCD display. The ShiftLCD library works with - all LCD displays that are compatible with the Hitachi HD44780 driver. - There are many of them out there, and you can usually tell them by the - 16-pin interface. - - This sketch prints "Hello World!" to the LCD and - uses the cursor() and noCursor() methods to turn - on and off the cursor. - - The circuit: - - ---Shift Register 74HC595--- - * SR Pin 14 to Arduino pin 2 - * SR Pin 12 to Arduino pin 3 - * SR Pin 11 to Arduino pin 4 - * SR Pin 8 to Ground - * SR Pin 16 to +5v - * SR Pin 13 to Ground - * SR Pin 10 to +5v - -----Shift Reg to LCD-------- - * SR Pin 15 to D7 - * SR Pin 1 to D6 - * SR Pin 2 to D5 - * SR Pin 3 to D4 - * SR Pin 5 to MOSFET gate - * SR Pin 6 to Enable - * SR Pin 7 to RS - -----LCD HD44780------------- - * Vss to Ground - * Vdd to +5V - * Vo to 10k Wiper - * R/W to Ground - * 5v to +5v - * Gnd to MOSFET Drain - ------N Chanel MOSFET-------- - * Source to Ground - * Gate to SP Pin 5 - * Drain to LCD Gnd - * 1k Resistor Between gate and source - - For a more detailed schematic, please see my blog: - - http://cjparish.blogspot.com/2010/01/controlling-lcd-display-with-shift.html - - Library modified from the original LiquidCrystal Library - This example originaly by Tom Igoe, Jul 2009 - Example modified for use with ShiftLCD - Chris Parish, January 12th 2010 - - */ - -// include the library code: -#include - -// initialize the library with the numbers of the interface pins -ShiftLCD lcd(2, 4, 3); - -void setup() { - // set up the LCD's number of rows and columns: - lcd.begin(16, 2); - // Print a message to the LCD. - lcd.print("hello, world!"); -} - -void loop() { - // Turn off the cursor: - lcd.noCursor(); - delay(500); - // Turn on the cursor: - lcd.cursor(); - delay(500); -} - diff --git a/libraries/ShiftLCD/examples/Display/Display.pde b/libraries/ShiftLCD/examples/Display/Display.pde deleted file mode 100644 index cc76da2..0000000 --- a/libraries/ShiftLCD/examples/Display/Display.pde +++ /dev/null @@ -1,76 +0,0 @@ -/* - ShiftLCD Library - Display - - Demonstrates the use a 16x2 LCD display. The ShiftLCD library works with - all LCD displays that are compatible with the Hitachi HD44780 driver. - There are many of them out there, and you can usually tell them by the - 16-pin interface. - - This sketch prints "Hello World!" to the LCD and uses the - display() and noDisplay() functions to turn on and off - the display. - - The circuit: - - ---Shift Register 74HC595--- - * SR Pin 14 to Arduino pin 2 - * SR Pin 12 to Arduino pin 3 - * SR Pin 11 to Arduino pin 4 - * SR Pin 8 to Ground - * SR Pin 16 to +5v - * SR Pin 13 to Ground - * SR Pin 10 to +5v - -----Shift Reg to LCD-------- - * SR Pin 15 to D7 - * SR Pin 1 to D6 - * SR Pin 2 to D5 - * SR Pin 3 to D4 - * SR Pin 5 to MOSFET gate - * SR Pin 6 to Enable - * SR Pin 7 to RS - -----LCD HD44780------------- - * Vss to Ground - * Vdd to +5V - * Vo to 10k Wiper - * R/W to Ground - * 5v to +5v - * Gnd to MOSFET Drain - ------N Chanel MOSFET-------- - * Source to Ground - * Gate to SP Pin 5 - * Drain to LCD Gnd - * 1k Resistor Between gate and source - - For a more detailed schematic, please see my blog: - - http://cjparish.blogspot.com/2010/01/controlling-lcd-display-with-shift.html - - Library modified from the original LiquidCrystal Library - This example originaly by Tom Igoe, Jul 2009 - Example modified for use with ShiftLCD - Chris Parish, January 12th 2010 - - */ - -// include the library code: -#include - -// initialize the library with the numbers of the interface pins -ShiftLCD lcd(2, 4, 3); - -void setup() { - // set up the LCD's number of rows and columns: - lcd.begin(16, 2); - // Print a message to the LCD. - lcd.print("hello, world!"); -} - -void loop() { - // Turn off the display: - lcd.noDisplay(); - delay(500); - // Turn on the display: - lcd.display(); - delay(500); -} - diff --git a/libraries/ShiftLCD/examples/HelloWorld/HelloWorld.pde b/libraries/ShiftLCD/examples/HelloWorld/HelloWorld.pde deleted file mode 100644 index 0eb8d09..0000000 --- a/libraries/ShiftLCD/examples/HelloWorld/HelloWorld.pde +++ /dev/null @@ -1,74 +0,0 @@ -/* - ShiftLCD Library - Hello World - - Demonstrates the use a 16x2 LCD display. The ShiftLCD library works with - all LCD displays that are compatible with the Hitachi HD44780 driver. - There are many of them out there, and you can usually tell them by the - 16-pin interface. - - This sketch prints "Hello World!" to the LCD - and shows the time. - - The circuit: - - ---Shift Register 74HC595--- - * SR Pin 14 to Arduino pin 2 - * SR Pin 12 to Arduino pin 3 - * SR Pin 11 to Arduino pin 4 - * SR Pin 8 to Ground - * SR Pin 16 to +5v - * SR Pin 13 to Ground - * SR Pin 10 to +5v - -----Shift Reg to LCD-------- - * SR Pin 15 to D7 - * SR Pin 1 to D6 - * SR Pin 2 to D5 - * SR Pin 3 to D4 - * SR Pin 5 to MOSFET gate - * SR Pin 6 to Enable - * SR Pin 7 to RS - -----LCD HD44780------------- - * Vss to Ground - * Vdd to +5V - * Vo to 10k Wiper - * R/W to Ground - * 5v to +5v - * Gnd to MOSFET Drain - ------N Chanel MOSFET-------- - * Source to Ground - * Gate to SP Pin 5 - * Drain to LCD Gnd - * 1k Resistor Between gate and source - - For a more detailed schematic, please see my blog: - - http://cjparish.blogspot.com/2010/01/controlling-lcd-display-with-shift.html - - Library modified from the original LiquidCrystal Library - This example originaly by Tom Igoe, Jul 2009 - Example modified for use with ShiftLCD - Chris Parish, January 12th 2010 - - */ - -// include the library code: -#include - -// initialize the library with the numbers of the interface pins -ShiftLCD lcd(2, 4, 3); - -void setup() { - // set up the LCD's number of rows and columns: - lcd.begin(16, 2); - // Print a message to the LCD. - lcd.print("Hello, World!"); -} - -void loop() { - // set the cursor to column 0, line 1 - // (note: line 1 is the second row, since counting begins with 0): - lcd.setCursor(0, 1); - // print the number of seconds since reset: - lcd.print(millis()/1000); -} - diff --git a/libraries/ShiftLCD/examples/Scroll/Scroll.pde b/libraries/ShiftLCD/examples/Scroll/Scroll.pde deleted file mode 100644 index 78c2c1b..0000000 --- a/libraries/ShiftLCD/examples/Scroll/Scroll.pde +++ /dev/null @@ -1,86 +0,0 @@ -/* - ShiftLCD Library - Scroll - - Demonstrates the use a 16x2 LCD display. The ShiftLCD library works with - all LCD displays that are compatible with the Hitachi HD44780 driver. - There are many of them out there, and you can usually tell them by the - 16-pin interface. - - This sketch prints "Hello World!" to the LCD and uses the - scrollDisplayLeft() and scrollDisplayRight() methods to scroll - the text. - - The circuit: - - ---Shift Register 74HC595--- - * SR Pin 14 to Arduino pin 2 - * SR Pin 12 to Arduino pin 3 - * SR Pin 11 to Arduino pin 4 - * SR Pin 8 to Ground - * SR Pin 16 to +5v - * SR Pin 13 to Ground - * SR Pin 10 to +5v - -----Shift Reg to LCD-------- - * SR Pin 15 to D7 - * SR Pin 1 to D6 - * SR Pin 2 to D5 - * SR Pin 3 to D4 - * SR Pin 5 to MOSFET gate - * SR Pin 6 to Enable - * SR Pin 7 to RS - -----LCD HD44780------------- - * Vss to Ground - * Vdd to +5V - * Vo to 10k Wiper - * R/W to Ground - * 5v to +5v - * Gnd to MOSFET Drain - ------N Chanel MOSFET-------- - * Source to Ground - * Gate to SP Pin 5 - * Drain to LCD Gnd - * 1k Resistor Between gate and source - - For a more detailed schematic, please see my blog: - - http://cjparish.blogspot.com/2010/01/controlling-lcd-display-with-shift.html - - Library modified from the original LiquidCrystal Library - This example originaly by Tom Igoe, Jul 2009 - Example modified for use with ShiftLCD - Chris Parish, January 12th 2010 - - */ - -// include the library code: -#include - -// initialize the library with the numbers of the interface pins -ShiftLCD lcd(2, 4, 3); - -void setup() { - // set up the LCD's number of rows and columns: - lcd.begin(16, 2); - lcd.setCursor(0,7); - // Print a message to the LCD. - lcd.print("hello, world!"); -} - -void loop() { - // scroll 27 positions (display length + string length) to the left: - for (int positionCounter = 0; positionCounter < 27; positionCounter++) { - // scroll one position left: - lcd.scrollDisplayLeft(); - // wait a bit: - delay(200); - } - - // scroll 27 positions (display length + string length) to the right: - for (int positionCounter = 0; positionCounter < 27; positionCounter++) { - // scroll one position right: - lcd.scrollDisplayRight(); - // wait a bit: - delay(200); - } -} - diff --git a/libraries/ShiftLCD/examples/SerialDisplay/SerialDisplay.pde b/libraries/ShiftLCD/examples/SerialDisplay/SerialDisplay.pde deleted file mode 100644 index 1a93485..0000000 --- a/libraries/ShiftLCD/examples/SerialDisplay/SerialDisplay.pde +++ /dev/null @@ -1,81 +0,0 @@ -/* - ShiftLCD Library - SerialDisplay - - Demonstrates the use a 16x2 LCD display. The ShiftLCD library works with - all LCD displays that are compatible with the Hitachi HD44780 driver. - There are many of them out there, and you can usually tell them by the - 16-pin interface. - - This sketch displays text sent over the serial port - (e.g. from the Serial Monitor) on an attached LCD. - - The circuit: - - ---Shift Register 74HC595--- - * SR Pin 14 to Arduino pin 2 - * SR Pin 12 to Arduino pin 3 - * SR Pin 11 to Arduino pin 4 - * SR Pin 8 to Ground - * SR Pin 16 to +5v - * SR Pin 13 to Ground - * SR Pin 10 to +5v - -----Shift Reg to LCD-------- - * SR Pin 15 to D7 - * SR Pin 1 to D6 - * SR Pin 2 to D5 - * SR Pin 3 to D4 - * SR Pin 5 to MOSFET gate - * SR Pin 6 to Enable - * SR Pin 7 to RS - -----LCD HD44780------------- - * Vss to Ground - * Vdd to +5V - * Vo to 10k Wiper - * R/W to Ground - * 5v to +5v - * Gnd to MOSFET Drain - ------N Chanel MOSFET-------- - * Source to Ground - * Gate to SP Pin 5 - * Drain to LCD Gnd - * 1k Resistor Between gate and source - - For a more detailed schematic, please see my blog: - - http://cjparish.blogspot.com/2010/01/controlling-lcd-display-with-shift.html - - Library modified from the original LiquidCrystal Library - This example originaly by Tom Igoe, Jul 2009 - Example modified for use with ShiftLCD - Chris Parish, January 12th 2010 - - */ - -// include the library code: -#include - -// initialize the library with the numbers of the interface pins -ShiftLCD lcd(2, 4, 3); - -void setup(){ - // set up the LCD's number of rows and columns: - lcd.begin(16, 2); - // initialize the serial communications: - Serial.begin(9600); -} - -void loop() -{ - // when characters arrive over the serial port... - if (Serial.available()) { - // wait a bit for the entire message to arrive - delay(100); - // clear the screen - lcd.clear(); - // read all the available characters - while (Serial.available() > 0) { - // display each character to the LCD - lcd.write(Serial.read()); - } - } -} diff --git a/libraries/ShiftLCD/examples/TextDirection/TextDirection.pde b/libraries/ShiftLCD/examples/TextDirection/TextDirection.pde deleted file mode 100644 index e6199e3..0000000 --- a/libraries/ShiftLCD/examples/TextDirection/TextDirection.pde +++ /dev/null @@ -1,102 +0,0 @@ -/* - ShiftLCD Library - TextDirection - - Demonstrates the use a 16x2 LCD display. The ShiftLCD library works with - all LCD displays that are compatible with the Hitachi HD44780 driver. - There are many of them out there, and you can usually tell them by the - 16-pin interface. - - This sketch demonstrates how to use leftToRight() and rightToLeft() - to move the cursor. - - The circuit: - - ---Shift Register 74HC595--- - * SR Pin 14 to Arduino pin 2 - * SR Pin 12 to Arduino pin 3 - * SR Pin 11 to Arduino pin 4 - * SR Pin 8 to Ground - * SR Pin 16 to +5v - * SR Pin 13 to Ground - * SR Pin 10 to +5v - -----Shift Reg to LCD-------- - * SR Pin 15 to D7 - * SR Pin 1 to D6 - * SR Pin 2 to D5 - * SR Pin 3 to D4 - * SR Pin 5 to MOSFET gate - * SR Pin 6 to Enable - * SR Pin 7 to RS - -----LCD HD44780------------- - * Vss to Ground - * Vdd to +5V - * Vo to 10k Wiper - * R/W to Ground - * 5v to +5v - * Gnd to MOSFET Drain - ------N Chanel MOSFET-------- - * Source to Ground - * Gate to SP Pin 5 - * Drain to LCD Gnd - * 1k Resistor Between gate and source - - For a more detailed schematic, please see my blog: - - http://cjparish.blogspot.com/2010/01/controlling-lcd-display-with-shift.html - - Library modified from the original LiquidCrystal Library - This example originaly by Tom Igoe, Jul 2009 - Example modified for use with ShiftLCD - Chris Parish, January 12th 2010 - - */ - -// include the library code: -#include - -// initialize the library with the numbers of the interface pins -ShiftLCD lcd(2, 4, 3); - -int thisChar = 'a'; - -void setup() { - // set up the LCD's number of rows and columns: - lcd.begin(16, 2); - // turn on the cursor: - lcd.cursor(); - Serial.begin(9600); -} - -void loop() { - // reverse directions at 'm': - if (thisChar == 'm') { - // go right for the next letter - lcd.rightToLeft(); - } - // reverse again at 's': - if (thisChar == 's') { - // go left for the next letter - lcd.leftToRight(); - } - // reset at 'z': - if (thisChar > 'z') { - // go to (0,0): - lcd.home(); - // start again at 0 - thisChar = 'a'; - } - // print the character - lcd.print(thisChar, BYTE); - // wait a second: - delay(1000); - // increment the letter: - thisChar++; -} - - - - - - - - diff --git a/libraries/ShiftLCD/examples/setCursor/setCursor.pde b/libraries/ShiftLCD/examples/setCursor/setCursor.pde deleted file mode 100644 index 4adf0a6..0000000 --- a/libraries/ShiftLCD/examples/setCursor/setCursor.pde +++ /dev/null @@ -1,87 +0,0 @@ -/* - ShiftLCD Library - setCursor - - Demonstrates the use a 16x2 LCD display. The ShiftLCD library works with - all LCD displays that are compatible with the Hitachi HD44780 driver. - There are many of them out there, and you can usually tell them by the - 16-pin interface. - - This sketch prints to all the positions of the LCD using the - setCursor method: - - The circuit: - - ---Shift Register 74HC595--- - * SR Pin 14 to Arduino pin 2 - * SR Pin 12 to Arduino pin 3 - * SR Pin 11 to Arduino pin 4 - * SR Pin 8 to Ground - * SR Pin 16 to +5v - * SR Pin 13 to Ground - * SR Pin 10 to +5v - -----Shift Reg to LCD-------- - * SR Pin 15 to D7 - * SR Pin 1 to D6 - * SR Pin 2 to D5 - * SR Pin 3 to D4 - * SR Pin 5 to MOSFET gate - * SR Pin 6 to Enable - * SR Pin 7 to RS - -----LCD HD44780------------- - * Vss to Ground - * Vdd to +5V - * Vo to 10k Wiper - * R/W to Ground - * 5v to +5v - * Gnd to MOSFET Drain - ------N Chanel MOSFET-------- - * Source to Ground - * Gate to SP Pin 5 - * Drain to LCD Gnd - * 1k Resistor Between gate and source - - For a more detailed schematic, please see my blog: - - http://cjparish.blogspot.com/2010/01/controlling-lcd-display-with-shift.html - - Library modified from the original LiquidCrystal Library - This example originaly by Tom Igoe, Jul 2009 - Example modified for use with ShiftLCD - Chris Parish, January 12th 2010 - - */ - -// include the library code: -#include - -// these constants won't change. But you can change the size of -// your LCD using them: -const int numRows = 2; -const int numCols = 16; - -// initialize the library with the numbers of the interface pins -ShiftLCD lcd(2, 4, 3); - -void setup() { - // set up the LCD's number of rows and columns: - lcd.begin(numRows, numCols); -} - -void loop() { - // loop from ASCII 'a' to ASCII 'z': - for (int thisLetter = 'a'; thisLetter <= 'z'; thisLetter++) { - // loop over the columns: - for (int thisCol = 0; thisCol < numRows; thisCol++) { - // loop over the rows: - for (int thisRow = 0; thisRow < numCols; thisRow++) { - // set the cursor position: - lcd.setCursor(thisRow,thisCol); - // print the letter: - lcd.print(thisLetter, BYTE); - delay(200); - } - } - } -} - -