Sfoglia il codice sorgente

Enables support the Cyrillic alphabet for LCD

Sergey Taranenko 12 anni fa
parent
commit
cfc193cdac
4 ha cambiato i file con 535 aggiunte e 1 eliminazioni
  1. 389
    0
      Marlin/LiquidCrystalRus.cpp
  2. 129
    0
      Marlin/LiquidCrystalRus.h
  3. 9
    1
      Marlin/ultralcd.h
  4. 8
    0
      Marlin/ultralcd.pde

+ 389
- 0
Marlin/LiquidCrystalRus.cpp Vedi File

1
+#include "LiquidCrystalRus.h"
2
+
3
+#include <stdio.h>
4
+#include <string.h>
5
+#include <inttypes.h>
6
+#include <avr/pgmspace.h>
7
+
8
+#if defined(ARDUINO) && ARDUINO >= 100
9
+  #include "Arduino.h"
10
+#else
11
+  #include "WProgram.h"
12
+#endif
13
+
14
+// it is a russian alphabet translation
15
+// except 0401 --> 0xa2 = ╗, 0451 --> 0xb5
16
+PROGMEM prog_uchar utf_recode[] = 
17
+       { 0x41,0xa0,0x42,0xa1,0xe0,0x45,0xa3,0xa4,0xa5,0xa6,0x4b,0xa7,0x4d,0x48,0x4f,
18
+         0xa8,0x50,0x43,0x54,0xa9,0xaa,0x58,0xe1,0xab,0xac,0xe2,0xad,0xae,0x62,0xaf,0xb0,0xb1,
19
+         0x61,0xb2,0xb3,0xb4,0xe3,0x65,0xb6,0xb7,0xb8,0xb9,0xba,0xbb,0xbc,0xbd,0x6f,
20
+         0xbe,0x70,0x63,0xbf,0x79,0xe4,0x78,0xe5,0xc0,0xc1,0xe6,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7
21
+        };     
22
+
23
+// When the display powers up, it is configured as follows:
24
+//
25
+// 1. Display clear
26
+// 2. Function set: 
27
+//    DL = 1; 8-bit interface data 
28
+//    N = 0; 1-line display 
29
+//    F = 0; 5x8 dot character font 
30
+// 3. Display on/off control: 
31
+//    D = 0; Display off 
32
+//    C = 0; Cursor off 
33
+//    B = 0; Blinking off 
34
+// 4. Entry mode set: 
35
+//    I/D = 1; Increment by 1 
36
+//    S = 0; No shift 
37
+//
38
+// Note, however, that resetting the Arduino doesn't reset the LCD, so we
39
+// can't assume that its in that state when a sketch starts (and the
40
+// LiquidCrystal constructor is called).
41
+// 
42
+// modified 27 Jul 2011
43
+// by Ilya V. Danilov http://mk90.ru/
44
+
45
+
46
+LiquidCrystalRus::LiquidCrystalRus(uint8_t rs, uint8_t rw, uint8_t enable,
47
+			     uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
48
+			     uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7)
49
+{
50
+  init(0, rs, rw, enable, d0, d1, d2, d3, d4, d5, d6, d7);
51
+}
52
+
53
+LiquidCrystalRus::LiquidCrystalRus(uint8_t rs, uint8_t enable,
54
+			     uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
55
+			     uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7)
56
+{
57
+  init(0, rs, 255, enable, d0, d1, d2, d3, d4, d5, d6, d7);
58
+}
59
+
60
+LiquidCrystalRus::LiquidCrystalRus(uint8_t rs, uint8_t rw, uint8_t enable,
61
+			     uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3)
62
+{
63
+  init(1, rs, rw, enable, d0, d1, d2, d3, 0, 0, 0, 0);
64
+}
65
+
66
+LiquidCrystalRus::LiquidCrystalRus(uint8_t rs,  uint8_t enable,
67
+			     uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3)
68
+{
69
+  init(1, rs, 255, enable, d0, d1, d2, d3, 0, 0, 0, 0);
70
+}
71
+
72
+void LiquidCrystalRus::init(uint8_t fourbitmode, uint8_t rs, uint8_t rw, uint8_t enable,
73
+			 uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
74
+			 uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7)
75
+{
76
+  _rs_pin = rs;
77
+  _rw_pin = rw;
78
+  _enable_pin = enable;
79
+  
80
+  _data_pins[0] = d0;
81
+  _data_pins[1] = d1;
82
+  _data_pins[2] = d2;
83
+  _data_pins[3] = d3; 
84
+  _data_pins[4] = d4;
85
+  _data_pins[5] = d5;
86
+  _data_pins[6] = d6;
87
+  _data_pins[7] = d7; 
88
+
89
+  pinMode(_rs_pin, OUTPUT);
90
+  // we can save 1 pin by not using RW. Indicate by passing 255 instead of pin#
91
+  if (_rw_pin != 255) { 
92
+    pinMode(_rw_pin, OUTPUT);
93
+  }
94
+  pinMode(_enable_pin, OUTPUT);
95
+  
96
+  if (fourbitmode)
97
+    _displayfunction = LCD_4BITMODE | LCD_1LINE | LCD_5x8DOTS;
98
+  else 
99
+    _displayfunction = LCD_8BITMODE | LCD_1LINE | LCD_5x8DOTS;
100
+  
101
+  begin(16, 1);  
102
+}
103
+
104
+void LiquidCrystalRus::begin(uint8_t cols, uint8_t lines, uint8_t dotsize) {
105
+  if (lines > 1) {
106
+    _displayfunction |= LCD_2LINE;
107
+  }
108
+  _numlines = lines;
109
+  _currline = 0;
110
+
111
+  // for some 1 line displays you can select a 10 pixel high font
112
+  if ((dotsize != 0) && (lines == 1)) {
113
+    _displayfunction |= LCD_5x10DOTS;
114
+  }
115
+
116
+  // SEE PAGE 45/46 FOR INITIALIZATION SPECIFICATION!
117
+  // according to datasheet, we need at least 40ms after power rises above 2.7V
118
+  // before sending commands. Arduino can turn on way befer 4.5V so we'll wait 50
119
+  delayMicroseconds(50000); 
120
+  // Now we pull both RS and R/W low to begin commands
121
+  digitalWrite(_rs_pin, LOW);
122
+  digitalWrite(_enable_pin, LOW);
123
+  if (_rw_pin != 255) { 
124
+    digitalWrite(_rw_pin, LOW);
125
+  }
126
+  
127
+  //put the LCD into 4 bit or 8 bit mode
128
+  if (! (_displayfunction & LCD_8BITMODE)) {
129
+    // this is according to the hitachi HD44780 datasheet
130
+    // figure 24, pg 46
131
+
132
+    // we start in 8bit mode, try to set 4 bit mode
133
+    writeNbits(0x03,4);
134
+    delayMicroseconds(4500); // wait min 4.1ms
135
+
136
+    // second try
137
+    writeNbits(0x03,4);
138
+    delayMicroseconds(4500); // wait min 4.1ms
139
+    
140
+    // third go!
141
+    writeNbits(0x03,4); 
142
+    delayMicroseconds(150);
143
+
144
+    // finally, set to 8-bit interface
145
+    writeNbits(0x02,4); 
146
+  } else {
147
+    // this is according to the hitachi HD44780 datasheet
148
+    // page 45 figure 23
149
+
150
+    // Send function set command sequence
151
+    command(LCD_FUNCTIONSET | _displayfunction);
152
+    delayMicroseconds(4500);  // wait more than 4.1ms
153
+
154
+    // second try
155
+    command(LCD_FUNCTIONSET | _displayfunction);
156
+    delayMicroseconds(150);
157
+
158
+    // third go
159
+    command(LCD_FUNCTIONSET | _displayfunction);
160
+  }
161
+
162
+  // finally, set # lines, font size, etc.
163
+  command(LCD_FUNCTIONSET | _displayfunction);  
164
+
165
+  // turn the display on with no cursor or blinking default
166
+  _displaycontrol = LCD_DISPLAYON | LCD_CURSOROFF | LCD_BLINKOFF;  
167
+  display();
168
+
169
+  // clear it off
170
+  clear();
171
+
172
+  // Initialize to default text direction (for romance languages)
173
+  _displaymode = LCD_ENTRYLEFT | LCD_ENTRYSHIFTDECREMENT;
174
+  // set the entry mode
175
+  command(LCD_ENTRYMODESET | _displaymode);
176
+
177
+}
178
+
179
+void LiquidCrystalRus::setDRAMModel(uint8_t model) {
180
+  _dram_model = model;
181
+}
182
+
183
+/********** high level commands, for the user! */
184
+void LiquidCrystalRus::clear()
185
+{
186
+  command(LCD_CLEARDISPLAY);  // clear display, set cursor position to zero
187
+  delayMicroseconds(2000);  // this command takes a long time!
188
+}
189
+
190
+void LiquidCrystalRus::home()
191
+{
192
+  command(LCD_RETURNHOME);  // set cursor position to zero
193
+  delayMicroseconds(2000);  // this command takes a long time!
194
+}
195
+
196
+void LiquidCrystalRus::setCursor(uint8_t col, uint8_t row)
197
+{
198
+  int row_offsets[] = { 0x00, 0x40, 0x14, 0x54 };
199
+  if ( row >= _numlines ) {
200
+    row = _numlines-1;    // we count rows starting w/0
201
+  }
202
+  
203
+  command(LCD_SETDDRAMADDR | (col + row_offsets[row]));
204
+}
205
+
206
+// Turn the display on/off (quickly)
207
+void LiquidCrystalRus::noDisplay() {
208
+  _displaycontrol &= ~LCD_DISPLAYON;
209
+  command(LCD_DISPLAYCONTROL | _displaycontrol);
210
+}
211
+void LiquidCrystalRus::display() {
212
+  _displaycontrol |= LCD_DISPLAYON;
213
+  command(LCD_DISPLAYCONTROL | _displaycontrol);
214
+}
215
+
216
+// Turns the underline cursor on/off
217
+void LiquidCrystalRus::noCursor() {
218
+  _displaycontrol &= ~LCD_CURSORON;
219
+  command(LCD_DISPLAYCONTROL | _displaycontrol);
220
+}
221
+void LiquidCrystalRus::cursor() {
222
+  _displaycontrol |= LCD_CURSORON;
223
+  command(LCD_DISPLAYCONTROL | _displaycontrol);
224
+}
225
+
226
+// Turn on and off the blinking cursor
227
+void LiquidCrystalRus::noBlink() {
228
+  _displaycontrol &= ~LCD_BLINKON;
229
+  command(LCD_DISPLAYCONTROL | _displaycontrol);
230
+}
231
+void LiquidCrystalRus::blink() {
232
+  _displaycontrol |= LCD_BLINKON;
233
+  command(LCD_DISPLAYCONTROL | _displaycontrol);
234
+}
235
+
236
+// These commands scroll the display without changing the RAM
237
+void LiquidCrystalRus::scrollDisplayLeft(void) {
238
+  command(LCD_CURSORSHIFT | LCD_DISPLAYMOVE | LCD_MOVELEFT);
239
+}
240
+void LiquidCrystalRus::scrollDisplayRight(void) {
241
+  command(LCD_CURSORSHIFT | LCD_DISPLAYMOVE | LCD_MOVERIGHT);
242
+}
243
+
244
+// This is for text that flows Left to Right
245
+void LiquidCrystalRus::leftToRight(void) {
246
+  _displaymode |= LCD_ENTRYLEFT;
247
+  command(LCD_ENTRYMODESET | _displaymode);
248
+}
249
+
250
+// This is for text that flows Right to Left
251
+void LiquidCrystalRus::rightToLeft(void) {
252
+  _displaymode &= ~LCD_ENTRYLEFT;
253
+  command(LCD_ENTRYMODESET | _displaymode);
254
+}
255
+
256
+// This will 'right justify' text from the cursor
257
+void LiquidCrystalRus::autoscroll(void) {
258
+  _displaymode |= LCD_ENTRYSHIFTINCREMENT;
259
+  command(LCD_ENTRYMODESET | _displaymode);
260
+}
261
+
262
+// This will 'left justify' text from the cursor
263
+void LiquidCrystalRus::noAutoscroll(void) {
264
+  _displaymode &= ~LCD_ENTRYSHIFTINCREMENT;
265
+  command(LCD_ENTRYMODESET | _displaymode);
266
+}
267
+
268
+// Allows us to fill the first 8 CGRAM locations
269
+// with custom characters
270
+void LiquidCrystalRus::createChar(uint8_t location, uint8_t charmap[]) {
271
+  location &= 0x7; // we only have 8 locations 0-7
272
+  command(LCD_SETCGRAMADDR | (location << 3));
273
+  for (int i=0; i<8; i++) {
274
+    write(charmap[i]);
275
+  }
276
+}
277
+
278
+/*********** mid level commands, for sending data/cmds */
279
+
280
+inline void LiquidCrystalRus::command(uint8_t value) {
281
+  send(value, LOW);
282
+}
283
+
284
+#if defined(ARDUINO) && ARDUINO >= 100
285
+  size_t LiquidCrystalRus::write(uint8_t value)
286
+#else
287
+  void   LiquidCrystalRus::write(uint8_t value)
288
+#endif
289
+{
290
+  uint8_t out_char=value;
291
+
292
+  if (_dram_model == LCD_DRAM_WH1601) {  
293
+    uint8_t ac=recv(LOW) & 0x7f;
294
+    if (ac>7 && ac<0x14) command(LCD_SETDDRAMADDR | (0x40+ac-8));
295
+  }
296
+
297
+  if (value>=0x80) { // UTF-8 handling
298
+    if (value >= 0xc0) {
299
+      utf_hi_char = value - 0xd0;
300
+    } else {
301
+      value &= 0x3f;
302
+      if (!utf_hi_char && (value == 1)) 
303
+        send(0xa2,HIGH); // ╗
304
+      else if ((utf_hi_char == 1) && (value == 0x11)) 
305
+        send(0xb5,HIGH); // ╦
306
+      else 
307
+        send(pgm_read_byte_near(utf_recode + value + (utf_hi_char<<6) - 0x10), HIGH);
308
+    }    
309
+  } else send(out_char, HIGH);
310
+#if defined(ARDUINO) && ARDUINO >= 100
311
+  return 1; // assume sucess 
312
+#endif
313
+}
314
+
315
+/************ low level data pushing commands **********/
316
+
317
+// write either command or data, with automatic 4/8-bit selection
318
+void LiquidCrystalRus::send(uint8_t value, uint8_t mode) {
319
+  digitalWrite(_rs_pin, mode);
320
+
321
+  // if there is a RW pin indicated, set it low to Write
322
+  if (_rw_pin != 255) { 
323
+    digitalWrite(_rw_pin, LOW);
324
+  }
325
+  
326
+  if (_displayfunction & LCD_8BITMODE) {
327
+    writeNbits(value,8); 
328
+  } else {
329
+    writeNbits(value>>4,4);
330
+    writeNbits(value,4);
331
+  }
332
+}
333
+
334
+// read  data, with automatic 4/8-bit selection
335
+uint8_t LiquidCrystalRus::recv(uint8_t mode) {
336
+  uint8_t retval;
337
+  digitalWrite(_rs_pin, mode);
338
+
339
+  // if there is a RW pin indicated, set it low to Write
340
+  if (_rw_pin != 255) { 
341
+    digitalWrite(_rw_pin, HIGH);
342
+  }
343
+  
344
+  if (_displayfunction & LCD_8BITMODE) {
345
+    retval = readNbits(8); 
346
+  } else {
347
+    retval = readNbits(4) << 4;
348
+    retval |= readNbits(4);
349
+  }
350
+  return retval;
351
+}
352
+void LiquidCrystalRus::pulseEnable() {
353
+  digitalWrite(_enable_pin, LOW);
354
+  delayMicroseconds(1);    
355
+  digitalWrite(_enable_pin, HIGH);
356
+  delayMicroseconds(1);    // enable pulse must be >450ns
357
+  digitalWrite(_enable_pin, LOW);
358
+  delayMicroseconds(100);   // commands need > 37us to settle
359
+}
360
+
361
+void LiquidCrystalRus::writeNbits(uint8_t value, uint8_t n) {
362
+  for (int i = 0; i < n; i++) {
363
+    pinMode(_data_pins[i], OUTPUT);
364
+    digitalWrite(_data_pins[i], (value >> i) & 0x01);
365
+  }
366
+
367
+  pulseEnable();
368
+}
369
+
370
+uint8_t LiquidCrystalRus::readNbits(uint8_t n) {
371
+  uint8_t retval=0;
372
+  for (int i = 0; i < n; i++) {
373
+    pinMode(_data_pins[i], INPUT);
374
+  }
375
+
376
+  digitalWrite(_enable_pin, LOW);
377
+  delayMicroseconds(1);    
378
+  digitalWrite(_enable_pin, HIGH);
379
+  delayMicroseconds(1);    // enable pulse must be >450ns
380
+  
381
+  for (int i = 0; i < n; i++) {
382
+    retval |= (digitalRead(_data_pins[i]) == HIGH)?(1 << i):0;
383
+  }
384
+
385
+  digitalWrite(_enable_pin, LOW);
386
+
387
+  return retval;
388
+}
389
+

+ 129
- 0
Marlin/LiquidCrystalRus.h Vedi File

1
+//
2
+// based on LiquidCrystal library from ArduinoIDE, see http://arduino.cc
3
+//  modified 27 Jul 2011
4
+// by Ilya V. Danilov http://mk90.ru/
5
+// 
6
+
7
+#ifndef LiquidCrystalRus_h
8
+#define LiquidCrystalRus_h
9
+
10
+#include <inttypes.h>
11
+#include "Print.h"
12
+
13
+// commands
14
+#define LCD_CLEARDISPLAY 0x01
15
+#define LCD_RETURNHOME 0x02
16
+#define LCD_ENTRYMODESET 0x04
17
+#define LCD_DISPLAYCONTROL 0x08
18
+#define LCD_CURSORSHIFT 0x10
19
+#define LCD_FUNCTIONSET 0x20
20
+#define LCD_SETCGRAMADDR 0x40
21
+#define LCD_SETDDRAMADDR 0x80
22
+
23
+// flags for display entry mode
24
+#define LCD_ENTRYRIGHT 0x00
25
+#define LCD_ENTRYLEFT 0x02
26
+#define LCD_ENTRYSHIFTINCREMENT 0x01
27
+#define LCD_ENTRYSHIFTDECREMENT 0x00
28
+
29
+// flags for display on/off control
30
+#define LCD_DISPLAYON 0x04
31
+#define LCD_DISPLAYOFF 0x00
32
+#define LCD_CURSORON 0x02
33
+#define LCD_CURSOROFF 0x00
34
+#define LCD_BLINKON 0x01
35
+#define LCD_BLINKOFF 0x00
36
+
37
+// flags for display/cursor shift
38
+#define LCD_DISPLAYMOVE 0x08
39
+#define LCD_CURSORMOVE 0x00
40
+#define LCD_MOVERIGHT 0x04
41
+#define LCD_MOVELEFT 0x00
42
+
43
+// flags for function set
44
+#define LCD_8BITMODE 0x10
45
+#define LCD_4BITMODE 0x00
46
+#define LCD_2LINE 0x08
47
+#define LCD_1LINE 0x00
48
+#define LCD_5x10DOTS 0x04
49
+#define LCD_5x8DOTS 0x00
50
+
51
+// enum for 
52
+#define LCD_DRAM_Normal 0x00
53
+#define LCD_DRAM_WH1601 0x01
54
+
55
+
56
+class LiquidCrystalRus : public Print {
57
+public:
58
+  LiquidCrystalRus(uint8_t rs, uint8_t enable,
59
+		uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
60
+		uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7);
61
+  LiquidCrystalRus(uint8_t rs, uint8_t rw, uint8_t enable,
62
+		uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
63
+		uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7);
64
+  LiquidCrystalRus(uint8_t rs, uint8_t rw, uint8_t enable,
65
+		uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3);
66
+  LiquidCrystalRus(uint8_t rs, uint8_t enable,
67
+		uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3);
68
+
69
+  void init(uint8_t fourbitmode, uint8_t rs, uint8_t rw, uint8_t enable,
70
+	    uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
71
+	    uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7);
72
+    
73
+  void begin(uint8_t cols, uint8_t rows, uint8_t charsize = LCD_5x8DOTS);
74
+
75
+  void clear();
76
+  void home();
77
+
78
+  void noDisplay();
79
+  void display();
80
+  void noBlink();
81
+  void blink();
82
+  void noCursor();
83
+  void cursor();
84
+  void scrollDisplayLeft();
85
+  void scrollDisplayRight();
86
+  void leftToRight();
87
+  void rightToLeft();
88
+  void autoscroll();
89
+  void noAutoscroll();
90
+
91
+  void createChar(uint8_t, uint8_t[]);
92
+  void setCursor(uint8_t, uint8_t);
93
+ 
94
+#if defined(ARDUINO) && ARDUINO >= 100
95
+  virtual size_t write(uint8_t);
96
+  using Print::write;
97
+#else
98
+  virtual void write(uint8_t);
99
+#endif
100
+
101
+  void command(uint8_t);
102
+
103
+  void setDRAMModel(uint8_t);
104
+
105
+private:
106
+  void send(uint8_t, uint8_t);
107
+  void writeNbits(uint8_t, uint8_t);
108
+  uint8_t recv(uint8_t);
109
+  uint8_t readNbits(uint8_t); 
110
+  void pulseEnable();
111
+
112
+  uint8_t _rs_pin; // LOW: command.  HIGH: character.
113
+  uint8_t _rw_pin; // LOW: write to LCD.  HIGH: read from LCD.
114
+  uint8_t _enable_pin; // activated by a HIGH pulse.
115
+  uint8_t _data_pins[8];
116
+
117
+  uint8_t _displayfunction;
118
+  uint8_t _displaycontrol;
119
+  uint8_t _displaymode;
120
+
121
+  uint8_t _initialized;
122
+
123
+  uint8_t _numlines,_currline;
124
+
125
+  uint8_t _dram_model;
126
+  uint8_t utf_hi_char; // UTF-8 high part
127
+};
128
+
129
+#endif

+ 9
- 1
Marlin/ultralcd.h Vedi File

2
 #define ULTRALCD_H
2
 #define ULTRALCD_H
3
 #include "Marlin.h"
3
 #include "Marlin.h"
4
 #ifdef ULTRA_LCD
4
 #ifdef ULTRA_LCD
5
-  #include <LiquidCrystal.h>
5
+#if LANGUAGE_CHOICE == 6
6
+#include "LiquidCrystalRus.h"
7
+#else
8
+#include <LiquidCrystal.h>
9
+#endif
6
   void lcd_status();
10
   void lcd_status();
7
   void lcd_init();
11
   void lcd_init();
8
   void lcd_status(const char* message);
12
   void lcd_status(const char* message);
12
 
16
 
13
   #define LCD_UPDATE_INTERVAL 100
17
   #define LCD_UPDATE_INTERVAL 100
14
   #define STATUSTIMEOUT 15000
18
   #define STATUSTIMEOUT 15000
19
+#if LANGUAGE_CHOICE == 6
20
+  extern LiquidCrystalRus lcd;
21
+#else
15
   extern LiquidCrystal lcd;
22
   extern LiquidCrystal lcd;
23
+#endif
16
   extern volatile char buttons;  //the last checked buttons in a bit array.
24
   extern volatile char buttons;  //the last checked buttons in a bit array.
17
   
25
   
18
   #ifdef NEWPANEL
26
   #ifdef NEWPANEL

+ 8
- 0
Marlin/ultralcd.pde Vedi File

6
 #include "language.h"
6
 #include "language.h"
7
 #include "temperature.h"
7
 #include "temperature.h"
8
 #include "EEPROMwrite.h"
8
 #include "EEPROMwrite.h"
9
+#if LANGUAGE_CHOICE == 6
10
+#include "LiquidCrystalRus.h"
11
+#else
9
 #include <LiquidCrystal.h>
12
 #include <LiquidCrystal.h>
13
+#endif
10
 //===========================================================================
14
 //===========================================================================
11
 //=============================imported variables============================
15
 //=============================imported variables============================
12
 //===========================================================================
16
 //===========================================================================
38
 //return for string conversion routines
42
 //return for string conversion routines
39
 static char conv[8];
43
 static char conv[8];
40
 
44
 
45
+#if LANGUAGE_CHOICE == 6
46
+LiquidCrystalRus lcd(LCD_PINS_RS, LCD_PINS_ENABLE, LCD_PINS_D4, LCD_PINS_D5,LCD_PINS_D6,LCD_PINS_D7);  //RS,Enable,D4,D5,D6,D7
47
+#else
41
 LiquidCrystal lcd(LCD_PINS_RS, LCD_PINS_ENABLE, LCD_PINS_D4, LCD_PINS_D5,LCD_PINS_D6,LCD_PINS_D7);  //RS,Enable,D4,D5,D6,D7 
48
 LiquidCrystal lcd(LCD_PINS_RS, LCD_PINS_ENABLE, LCD_PINS_D4, LCD_PINS_D5,LCD_PINS_D6,LCD_PINS_D7);  //RS,Enable,D4,D5,D6,D7 
49
+#elseif
42
 
50
 
43
 static unsigned long previous_millis_lcd=0;
51
 static unsigned long previous_millis_lcd=0;
44
 //static long previous_millis_buttons=0;
52
 //static long previous_millis_buttons=0;

Loading…
Annulla
Salva