forked from jazz-soft/char-lcd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.html
46 lines (42 loc) · 1.23 KB
/
test.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<!DOCTYPE html>
<html>
<head>
<title>char-lcd test</title>
<script src="javascript/char-lcd.js"></script>
<script><!--
--></script>
</head>
<body>
<h1>char-lcd test</h1>
<div>
<span id=lcd1></span>
<span id=lcd0></span>
<span id=lcd2></span>
</div>
<div>
<span id=lcdjp></span>
<span id=lcdv></span>
<span id=lcdeu></span>
</div>
<script><!--
var i, j;
var lcd0 = new CharLCD({ at: 'lcd0', rows: 1, cols: 1, off: '#fff', on: '#f00' });
var lcd1 = new CharLCD({ at: 'lcd1', rows: 1, cols: 16, off: '#fff', on: '#000' });
var lcd2 = new CharLCD({ at: 'lcd2', rows: 1, cols: 16, off: '#fff', on: '#000' });
var lcdv = new CharLCD({ at: 'lcdv', rows: 16, cols: 1, off: '#fff', on: '#000' });
var lcdjp = new CharLCD({ at: 'lcdjp', rows: 16, cols: 16 });
var lcdeu = new CharLCD({ at: 'lcdeu', rows: 16, cols: 16, rom: 'eu', off: '#008', on: '#fe8' });
lcd0.font(0, [0, 10, 21, 17, 10, 4]);
lcd0.char(0, 0, String.fromCharCode(0));
for (i = 0; i < 16; i++) {
lcd1.char(0, i, "0123456789ABCDEF"[i]);
lcd2.char(0, i, "0123456789ABCDEF"[i]);
lcdv.char(i, 0, "0123456789ABCDEF"[i]);
for (j = 0; j < 16; j++) {
lcdjp.char(i, j, String.fromCharCode(i * 16 + j));
lcdeu.char(i, j, String.fromCharCode(i * 16 + j));
}
}
--></script>
</body>
</html>