Skip to content
Newer
Older
100644 103 lines (58 sloc) 1.71 KB
329525f @rwaldron Add removal delimiters to eg template. Update examples
authored
1 <!--remove-start-->
32cb046 @Resseguie Combines eg json files
Resseguie authored
2
3 # LCD
4
7ad3992 @rwaldron Examples: fix removal section
authored
5 <!--remove-end-->
6
7
8
32cb046 @Resseguie Combines eg json files
Resseguie authored
9
6b5ab5b @rwaldron Rebuild all example program markdown files
authored
10
6bf1b6c @rwaldron Examples: kinect update; regenerate
authored
11
6753bd4 @rwaldron Proximity: add details, re: PingFirmata. Regenerate examples
authored
12 ##### Breadboard for "LCD"
6bf1b6c @rwaldron Examples: kinect update; regenerate
authored
13
14
15
16 ![docs/breadboard/lcd.png](breadboard/lcd.png)<br>
17
18 Fritzing diagram: [docs/breadboard/lcd.fzz](breadboard/lcd.fzz)
19
20 &nbsp;
21
22
23
7ad3992 @rwaldron Examples: fix removal section
authored
24
2ebcb61 @rwaldron Make examples instruction more verbose
authored
25 Run this example from the command line with:
6b5ab5b @rwaldron Rebuild all example program markdown files
authored
26 ```bash
27 node eg/lcd.js
28 ```
32cb046 @Resseguie Combines eg json files
Resseguie authored
29
6b5ab5b @rwaldron Rebuild all example program markdown files
authored
30
31 ```javascript
5c15b37 @rwaldron Example program cleanup
authored
32 var five = require("johnny-five"),
ca469ef @rwaldron Regenerate all of the doc/example files
authored
33 board, lcd;
6b5ab5b @rwaldron Rebuild all example program markdown files
authored
34
6fab8bb @rwaldron Regenerate lcd.md to display eg/lcd.js
authored
35 board = new five.Board();
6b5ab5b @rwaldron Rebuild all example program markdown files
authored
36
6fab8bb @rwaldron Regenerate lcd.md to display eg/lcd.js
authored
37 board.on("ready", function() {
6b5ab5b @rwaldron Rebuild all example program markdown files
authored
38
39 lcd = new five.LCD({
6fab8bb @rwaldron Regenerate lcd.md to display eg/lcd.js
authored
40 // LCD pin name RS EN DB4 DB5 DB6 DB7
41 // Arduino pin # 7 8 9 10 11 12
9ad3e0f @stevekinney LCD: adjust pins to match comments
stevekinney authored
42 pins: [7, 8, 9, 10, 11, 12],
43 backlight: 6,
05584be @Resseguie move readme updates to template and generate
Resseguie authored
44 rows: 2,
45 cols: 20
46
8c11bcb @rwaldron Update example md and readme
authored
47
48 // Options:
49 // bitMode: 4 or 8, defaults to 4
50 // lines: number of lines, defaults to 2
51 // dots: matrix dimensions, defaults to "5x8"
6b5ab5b @rwaldron Rebuild all example program markdown files
authored
52 });
53
7342a11 @rwaldron LCD: Update examples to reflect present, correct API
authored
54 // Tell the LCD you will use these characters:
55 lcd.useChar("check");
56 lcd.useChar("heart");
57 lcd.useChar("duck");
58
59 // Line 1: Hi rmurphey & hgstrp!
60 lcd.clear().print("rmurphey, hgstrp");
61 lcd.cursor(1, 0);
62
63 // Line 2: I <3 johnny-five
64 // lcd.print("I").write(7).print(" johnny-five");
65 // can now be written as:
66 lcd.print("I :heart: johnny-five");
67
68 this.wait(3000, function() {
69 lcd.clear().cursor(0, 0).print("I :check::heart: 2 :duck: :)");
8c11bcb @rwaldron Update example md and readme
authored
70 });
6fab8bb @rwaldron Regenerate lcd.md to display eg/lcd.js
authored
71
6b5ab5b @rwaldron Rebuild all example program markdown files
authored
72 this.repl.inject({
73 lcd: lcd
74 });
75 });
8c11bcb @rwaldron Update example md and readme
authored
76
5e929ce @rwaldron Example program updates
authored
77
78
6b5ab5b @rwaldron Rebuild all example program markdown files
authored
79 ```
80
938e295 @rwaldron Removes @device tags and replaces with arbitrary @markdown regions
authored
81
6b5ab5b @rwaldron Rebuild all example program markdown files
authored
82
32cb046 @Resseguie Combines eg json files
Resseguie authored
83
84
85
86
6b5ab5b @rwaldron Rebuild all example program markdown files
authored
87
5f18f82 @rwaldron Examples: regenerated
authored
88 ## Additional Notes
938e295 @rwaldron Removes @device tags and replaces with arbitrary @markdown regions
authored
89 [16 x 2 LCD White on Blue](http://www.hacktronics.com/LCDs/16-x-2-LCD-White-on-Blue/flypage.tpl.html)
90 [20 x 4 LCD White on Blue](http://www.hacktronics.com/LCDs/20-x-4-LCD-White-on-Blue/flypage.tpl.html)
6b5ab5b @rwaldron Rebuild all example program markdown files
authored
91
32cb046 @Resseguie Combines eg json files
Resseguie authored
92 &nbsp;
93
329525f @rwaldron Add removal delimiters to eg template. Update examples
authored
94 <!--remove-start-->
32cb046 @Resseguie Combines eg json files
Resseguie authored
95
6b5ab5b @rwaldron Rebuild all example program markdown files
authored
96 ## License
8c167ba @rwaldron Update copyright year
authored
97 Copyright (c) 2012, 2013, 2014 Rick Waldron <waldron.rick@gmail.com>
6ee1faa @rwaldron Regenerate the docs examples
authored
98 Licensed under the MIT license.
bd4c687 @rwaldron Examples: update the copyright year to reference the year that the ac…
authored
99 Copyright (c) 2016 The Johnny-Five Contributors
6b5ab5b @rwaldron Rebuild all example program markdown files
authored
100 Licensed under the MIT license.
32cb046 @Resseguie Combines eg json files
Resseguie authored
101
329525f @rwaldron Add removal delimiters to eg template. Update examples
authored
102 <!--remove-end-->
Something went wrong with that request. Please try again.