Subversion Repositories idreammicro-arduino

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
21 jlesech 1
/*
2
 
3
 * Deuligne.h
4
 *
5
 * copyleft 2011 snootlab
6
 * free software, have fun !
7
 *
8
based on official arduino LiquidCrystal Library
9
 - Autoscroll
10
 
11
 Demonstrates the use a 16x2 LCD display.  The LiquidCrystal
12
 library works with all LCD displays that are compatible with the
13
 Hitachi HD44780 driver. There are many of them out there, and you
14
 can usually tell them by the 16-pin interface.
15
 
16
 This sketch demonstrates the use of the autoscroll()
17
 and noAutoscroll() functions to make new text scroll or not.
18
 
19
 
20
 Library originally added 18 Apr 2008
21
 by David A. Mellis
22
 library modified 5 Jul 2009
23
 by Limor Fried (http://www.ladyada.net)
24
 example added 9 Jul 2009
25
 by Tom Igoe
26
 modified 22 Nov 2010
27
 by Tom Igoe
28
 
29
 This example code is in the public domain.
30
 
31
 http://www.arduino.cc/en/Tutorial/LiquidCrystal
32
 */
33
 
34
// include the library code:
35
#include "Wire.h"
36
#include <Deuligne.h>
37
 
38
// initialize the library with the numbers of the interface pins
39
 
40
Deuligne lcd;
41
 
42
void setup() {
43
  // set up the LCD's number of columns and rows:
44
  Wire.begin(); // join i2c bus (address optional for master)
45
  lcd.init(); // initialisation du panneau LCD (obligatoire)
46
}
47
 
48
void loop() {
49
  // set the cursor to (0,0):
50
  lcd.setCursor(0, 0);
51
  // print from 0 to 9:
52
  for (int thisChar = 0; thisChar < 10; thisChar++) {
53
   lcd.print(thisChar);
54
   delay(500);
55
  }
56
 
57
  // set the cursor to (16,1):
58
  lcd.setCursor(16,1);
59
  // set the display to automatically scroll:
60
  lcd.autoscroll();
61
  // print from 0 to 9:
62
  for (int thisChar = 0; thisChar < 10; thisChar++) {
63
    lcd.print(thisChar);
64
    delay(500);
65
  }
66
  // turn off automatic scrolling
67
  lcd.noAutoscroll();
68
 
69
  // clear screen for the next loop:
70
  lcd.clear();
71
}
72