36 |
37 |
38 |
--------------------------------------------------------------------------------
/docs/html/menudata.js:
--------------------------------------------------------------------------------
1 | /*
2 | @licstart The following is the entire license notice for the JavaScript code in this file.
3 |
4 | The MIT License (MIT)
5 |
6 | Copyright (C) 1997-2020 by Dimitri van Heesch
7 |
8 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
9 | and associated documentation files (the "Software"), to deal in the Software without restriction,
10 | including without limitation the rights to use, copy, modify, merge, publish, distribute,
11 | sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
12 | furnished to do so, subject to the following conditions:
13 |
14 | The above copyright notice and this permission notice shall be included in all copies or
15 | substantial portions of the Software.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
18 | BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
20 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 |
23 | @licend The above is the entire license notice for the JavaScript code in this file
24 | */
25 | var menudata={children:[
26 | {text:"Main Page",url:"index.html"},
27 | {text:"Classes",url:"annotated.html",children:[
28 | {text:"Class List",url:"annotated.html"},
29 | {text:"Class Index",url:"classes.html"},
30 | {text:"Class Hierarchy",url:"hierarchy.html"},
31 | {text:"Class Members",url:"functions.html",children:[
32 | {text:"All",url:"functions.html"},
33 | {text:"Functions",url:"functions_func.html"}]}]},
34 | {text:"Files",url:"files.html",children:[
35 | {text:"File List",url:"files.html"}]}]}
36 |
--------------------------------------------------------------------------------
/src/BarStyle2.h:
--------------------------------------------------------------------------------
1 | #ifndef BAR_STYLE_2
2 | #define BAR_STYLE_2
3 |
4 | // Contains the bit masks defining a style for a smooth progress bar
5 | // to be used with SmoothProgress library
6 | // https://github.com/Gjorgjevikj/SmoothProgress.git
7 | //
8 | // Defines a horizontal PLAIN smooth progress bar
9 | // no frame, no margin, rounded edges
10 |
11 | #include
12 |
13 | #if (defined BAR_STYLE_2_IN_PROGMEM) || (defined BAR_STYLES_IN_PROGMEM)
14 | static const PROGMEM struct barstyle
15 | #else
16 | static const struct barstyle
17 | #endif
18 |
19 | barStyle2 = {
20 | {
21 | { // leftANDmask
22 | 0b01111,
23 | 0b11111,
24 | 0b11111,
25 | 0b11111,
26 | 0b11111,
27 | 0b11111,
28 | 0b11111,
29 | 0b01111},
30 | { // leftORmask
31 | 0b01111,
32 | 0b10000,
33 | 0b10000,
34 | 0b10000,
35 | 0b10000,
36 | 0b10000,
37 | 0b10000,
38 | 0b01111 }
39 | },
40 | {
41 | { // rightANDmask
42 | 0b11110,
43 | 0b11111,
44 | 0b11111,
45 | 0b11111,
46 | 0b11111,
47 | 0b11111,
48 | 0b11111,
49 | 0b11110 },
50 | { // rightORmask
51 | 0b11110,
52 | 0b00001,
53 | 0b00001,
54 | 0b00001,
55 | 0b00001,
56 | 0b00001,
57 | 0b00001,
58 | 0b11110 }
59 | },
60 | {
61 | { // middleANDmask
62 | 0b11111,
63 | 0b11111,
64 | 0b11111,
65 | 0b11111,
66 | 0b11111,
67 | 0b11111,
68 | 0b11111,
69 | 0b11111 },
70 | { // middleORmask
71 | 0b11111,
72 | 0b00000,
73 | 0b00000,
74 | 0b00000,
75 | 0b00000,
76 | 0b00000,
77 | 0b00000,
78 | 0b11111 }
79 | },
80 | 1, // left offset
81 | 1, // right offset
82 | 0 // orientation
83 | };
84 |
85 | #endif // !BAR_STYLE_2
86 |
--------------------------------------------------------------------------------
/docs/html/navtreedata.js:
--------------------------------------------------------------------------------
1 | /*
2 | @licstart The following is the entire license notice for the JavaScript code in this file.
3 |
4 | The MIT License (MIT)
5 |
6 | Copyright (C) 1997-2020 by Dimitri van Heesch
7 |
8 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
9 | and associated documentation files (the "Software"), to deal in the Software without restriction,
10 | including without limitation the rights to use, copy, modify, merge, publish, distribute,
11 | sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
12 | furnished to do so, subject to the following conditions:
13 |
14 | The above copyright notice and this permission notice shall be included in all copies or
15 | substantial portions of the Software.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
18 | BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
20 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 |
23 | @licend The above is the entire license notice for the JavaScript code in this file
24 | */
25 | var NAVTREE =
26 | [
27 | [ "SmoothProgress", "index.html", [
28 | [ "Classes", "annotated.html", [
29 | [ "Class List", "annotated.html", "annotated_dup" ],
30 | [ "Class Index", "classes.html", null ],
31 | [ "Class Hierarchy", "hierarchy.html", "hierarchy" ],
32 | [ "Class Members", "functions.html", [
33 | [ "All", "functions.html", null ],
34 | [ "Functions", "functions_func.html", null ]
35 | ] ]
36 | ] ],
37 | [ "Files", "files.html", [
38 | [ "File List", "files.html", "files_dup" ]
39 | ] ]
40 | ] ]
41 | ];
42 |
43 | var NAVTREEINDEX =
44 | [
45 | "_bar_style0_8h_source.html"
46 | ];
47 |
48 | var SYNCONMSG = 'click to disable panel synchronisation';
49 | var SYNCOFFMSG = 'click to enable panel synchronisation';
--------------------------------------------------------------------------------
/src/BarStyle0.h:
--------------------------------------------------------------------------------
1 | #ifndef BAR_STYLE_0
2 | #define BAR_STYLE_0
3 |
4 | // Contains the bit masks defining a style for a smooth progress bar
5 | // to be used with SmoothProgress library
6 | // https://github.com/Gjorgjevikj/SmoothProgress.git
7 | //
8 | // Defines a horizontal PLAIN smooth progress bar
9 | // No frame, full height, square edges, plain
10 |
11 | #include
12 |
13 | #if (defined BAR_STYLE_0_IN_PROGMEM) || (defined BAR_STYLES_IN_PROGMEM)
14 | static const PROGMEM struct barstyle
15 | #else
16 | static const struct barstyle
17 | #endif
18 |
19 | barStyle0 = {
20 | {
21 | { // leftANDmask
22 | 0b11111,
23 | 0b11111,
24 | 0b11111,
25 | 0b11111,
26 | 0b11111,
27 | 0b11111,
28 | 0b11111,
29 | 0b11111},
30 | { // leftORmask
31 | 0b00000,
32 | 0b00000,
33 | 0b00000,
34 | 0b00000,
35 | 0b00000,
36 | 0b00000,
37 | 0b00000,
38 | 0b00000}
39 | },
40 | {
41 | { // rightANDmask
42 | 0b11111,
43 | 0b11111,
44 | 0b11111,
45 | 0b11111,
46 | 0b11111,
47 | 0b11111,
48 | 0b11111,
49 | 0b11111},
50 | { // rightORmask
51 | 0b00000,
52 | 0b00000,
53 | 0b00000,
54 | 0b00000,
55 | 0b00000,
56 | 0b00000,
57 | 0b00000,
58 | 0b00000}
59 | },
60 | {
61 | { // middleANDmask
62 | 0b11111,
63 | 0b11111,
64 | 0b11111,
65 | 0b11111,
66 | 0b11111,
67 | 0b11111,
68 | 0b11111,
69 | 0b11111},
70 | { // middleORmask
71 | 0b00000,
72 | 0b00000,
73 | 0b00000,
74 | 0b00000,
75 | 0b00000,
76 | 0b00000,
77 | 0b00000,
78 | 0b00000}
79 | },
80 | 0, // LeftOffset
81 | 0, // RightOffset
82 | 0 // orientation...
83 | };
84 |
85 | #endif // !BAR_STYLE_0
86 |
--------------------------------------------------------------------------------
/src/BarStyle1.h:
--------------------------------------------------------------------------------
1 | #ifndef BAR_STYLE_1
2 | #define BAR_STYLE_1
3 |
4 | // Contains the bit masks defining a style for a smooth progress bar
5 | // to be used with SmoothProgress library
6 | // https://github.com/Gjorgjevikj/SmoothProgress.git
7 | //
8 | // smooth progressbar in square frame
9 | // 1 pixel frame, 1 pixel margine to frame, square edges
10 |
11 | #include
12 |
13 | #if (defined BAR_STYLE_1_IN_PROGMEM) || (defined BAR_STYLES_IN_PROGMEM)
14 | static const PROGMEM struct barstyle
15 | #else
16 | static const struct barstyle
17 | #endif
18 |
19 | barStyle1 = {
20 | {
21 | { // leftANDmask
22 | 0b00000,
23 | 0b00000,
24 | 0b00111,
25 | 0b00111,
26 | 0b00111,
27 | 0b00111,
28 | 0b00000,
29 | 0b00000},
30 | { // leftORmask
31 | 0b11111,
32 | 0b10000,
33 | 0b10000,
34 | 0b10000,
35 | 0b10000,
36 | 0b10000,
37 | 0b10000,
38 | 0b11111}
39 | },
40 | {
41 | { // rightANDmask
42 | 0b00000,
43 | 0b00000,
44 | 0b11100,
45 | 0b11100,
46 | 0b11100,
47 | 0b11100,
48 | 0b00000,
49 | 0b00000},
50 | { // rightORmask
51 | 0b11111,
52 | 0b00001,
53 | 0b00001,
54 | 0b00001,
55 | 0b00001,
56 | 0b00001,
57 | 0b00001,
58 | 0b11111}
59 | },
60 | {
61 | { // middleANDmask
62 | 0b00000,
63 | 0b00000,
64 | 0b11111,
65 | 0b11111,
66 | 0b11111,
67 | 0b11111,
68 | 0b00000,
69 | 0b00000},
70 | { // middleORmask
71 | 0b11111,
72 | 0b00000,
73 | 0b00000,
74 | 0b00000,
75 | 0b00000,
76 | 0b00000,
77 | 0b00000,
78 | 0b11111}
79 | },
80 | 2, // LeftOffset
81 | 2, // RightOffset
82 | 0 // direction...
83 | };
84 |
85 |
86 | #endif // BAR_STYLE_1
87 |
--------------------------------------------------------------------------------
/src/BarStyleV0.h:
--------------------------------------------------------------------------------
1 | #ifndef BAR_STYLE_V_0
2 | #define BAR_STYLE_V_0
3 |
4 | // Contains the bit masks defining a style for a smooth progress bar
5 | // to be used with SmoothProgress library
6 | // https://github.com/Gjorgjevikj/SmoothProgress.git
7 | //
8 | // Defines a vertical PLAIN smooth progress bar
9 | // No frame, full height, square edges, plain
10 |
11 | #include
12 |
13 | #if (defined BAR_STYLE_V_0_IN_PROGMEM) || (defined BAR_STYLES_IN_PROGMEM)
14 | static const PROGMEM struct barstyle
15 | #else
16 | static const struct barstyle
17 | #endif
18 |
19 | barStyleV0 = {
20 | {
21 | { // bottomANDmask
22 | 0b11111,
23 | 0b11111,
24 | 0b11111,
25 | 0b11111,
26 | 0b11111,
27 | 0b11111,
28 | 0b11111,
29 | 0b11111},
30 | { // bottomORmask
31 | 0b00000,
32 | 0b00000,
33 | 0b00000,
34 | 0b00000,
35 | 0b00000,
36 | 0b00000,
37 | 0b00000,
38 | 0b00000}
39 | },
40 | {
41 | { // topANDmask
42 | 0b11111,
43 | 0b11111,
44 | 0b11111,
45 | 0b11111,
46 | 0b11111,
47 | 0b11111,
48 | 0b11111,
49 | 0b11111},
50 | { // topORmask
51 | 0b00000,
52 | 0b00000,
53 | 0b00000,
54 | 0b00000,
55 | 0b00000,
56 | 0b00000,
57 | 0b00000,
58 | 0b00000}
59 | },
60 | {
61 | { // middleANDmask
62 | 0b11111,
63 | 0b11111,
64 | 0b11111,
65 | 0b11111,
66 | 0b11111,
67 | 0b11111,
68 | 0b11111,
69 | 0b11111},
70 | { // middleORmask
71 | 0b00000,
72 | 0b00000,
73 | 0b00000,
74 | 0b00000,
75 | 0b00000,
76 | 0b00000,
77 | 0b00000,
78 | 0b00000}
79 | },
80 | 0, // LeftOffset
81 | 0, // RightOffset
82 | 1 // orientation...
83 | };
84 |
85 | #endif // !BAR_STYLE_V_0
86 |
--------------------------------------------------------------------------------
/src/BarStyle3.h:
--------------------------------------------------------------------------------
1 | #ifndef BAR_STYLE_3
2 | #define BAR_STYLE_3
3 |
4 | // Contains the bit masks defining a style for a smooth progress bar
5 | // to be used with SmoothProgress library
6 | // https://github.com/Gjorgjevikj/SmoothProgress.git
7 | //
8 | // Defines a smooth horizontal progress bar rounded style no frame
9 | // 1 pixel frame, no margin (full height), more rounded edges
10 |
11 | #include
12 |
13 | #if (defined BAR_STYLE_3_IN_PROGMEM) || (defined BAR_STYLES_IN_PROGMEM)
14 | static const PROGMEM struct barstyle
15 | #else
16 | static const struct barstyle
17 | #endif
18 |
19 | barStyle3 = {
20 | {
21 | { // leftANDmask
22 | 0b00111,
23 | 0b01111,
24 | 0b11111,
25 | 0b11111,
26 | 0b11111,
27 | 0b11111,
28 | 0b01111,
29 | 0b00111},
30 | { // leftORmask
31 | 0b00111,
32 | 0b01000,
33 | 0b10000,
34 | 0b10000,
35 | 0b10000,
36 | 0b10000,
37 | 0b01000,
38 | 0b00111 }
39 | },
40 | {
41 | { // rightANDmask
42 | 0b11100,
43 | 0b11110,
44 | 0b11111,
45 | 0b11111,
46 | 0b11111,
47 | 0b11111,
48 | 0b11110,
49 | 0b11100},
50 | { // rightORmask
51 | 0b11100,
52 | 0b00010,
53 | 0b00001,
54 | 0b00001,
55 | 0b00001,
56 | 0b00001,
57 | 0b00010,
58 | 0b11100}
59 | },
60 | {
61 | { // middleANDmask
62 | 0b11111,
63 | 0b11111,
64 | 0b11111,
65 | 0b11111,
66 | 0b11111,
67 | 0b11111,
68 | 0b11111,
69 | 0b11111},
70 | { // middleORmask
71 | 0b11111,
72 | 0b00000,
73 | 0b00000,
74 | 0b00000,
75 | 0b00000,
76 | 0b00000,
77 | 0b00000,
78 | 0b11111}
79 | },
80 | 1, // left offset,
81 | 1, // right offset
82 | 0 // orientation
83 | };
84 |
85 | #endif // !BAR_STYLE_3
86 |
--------------------------------------------------------------------------------
/src/BarStyle4.h:
--------------------------------------------------------------------------------
1 | #ifndef BAR_STYLE_4
2 | #define BAR_STYLE_4
3 |
4 | // Contains the bit masks defining a style for a smooth progress bar
5 | // to be used with SmoothProgress library
6 | // https://github.com/Gjorgjevikj/SmoothProgress.git
7 | //
8 | // Defines a smooth horizontal progress bar rounded style no frame
9 | // 1 pixel frame, no margin (full height), more rounded edges
10 |
11 | #include
12 |
13 | #if (defined BAR_STYLE_4_IN_PROGMEM) || (defined BAR_STYLES_IN_PROGMEM)
14 | static const PROGMEM struct barstyle
15 | #else
16 | static const struct barstyle
17 | #endif
18 |
19 | barStyle4 = {
20 | {
21 | { // leftANDmask
22 | 0b00000,
23 | 0b00000,
24 | 0b00011,
25 | 0b00111,
26 | 0b00111,
27 | 0b00011,
28 | 0b00000,
29 | 0b00000},
30 | { // leftORmask
31 | 0b00111,
32 | 0b01000,
33 | 0b10000,
34 | 0b10000,
35 | 0b10000,
36 | 0b10000,
37 | 0b01000,
38 | 0b00111}
39 | },
40 | {
41 | { // rightANDmask
42 | 0b00000,
43 | 0b00000,
44 | 0b11000,
45 | 0b11100,
46 | 0b11100,
47 | 0b11000,
48 | 0b00000,
49 | 0b00000},
50 | { // rightORmask
51 | 0b11100,
52 | 0b00010,
53 | 0b00001,
54 | 0b00001,
55 | 0b00001,
56 | 0b00001,
57 | 0b00010,
58 | 0b11100}
59 | },
60 | {
61 | { // middleANDmask
62 | 0b00000,
63 | 0b00000,
64 | 0b11111,
65 | 0b11111,
66 | 0b11111,
67 | 0b11111,
68 | 0b00000,
69 | 0b00000},
70 | { // middleORmask
71 | 0b11111,
72 | 0b00000,
73 | 0b00000,
74 | 0b00000,
75 | 0b00000,
76 | 0b00000,
77 | 0b00000,
78 | 0b11111}
79 | },
80 | 2, // left offset,
81 | 2, // right offset
82 | 0 // orientation
83 | };
84 |
85 | #endif // !BAR_STYLE_4
86 |
--------------------------------------------------------------------------------
/src/BarStyleV1.h:
--------------------------------------------------------------------------------
1 | #ifndef BAR_STYLE_V_1
2 | #define BAR_STYLE_V_1
3 |
4 | // Contains the bit masks defining a style for a smooth progress bar
5 | // to be used with SmoothProgress library
6 | // https://github.com/Gjorgjevikj/SmoothProgress.git
7 | //
8 | // Defines a vertical smooth progress bar in square frame
9 | // 1 pixel frame, 1 pixel margin to frame, square edges
10 |
11 | #include
12 |
13 | #if (defined BAR_STYLE_V_1_IN_PROGMEM) || (defined BAR_STYLES_IN_PROGMEM)
14 | static const PROGMEM struct barstyle
15 | #else
16 | static const struct barstyle
17 | #endif
18 |
19 | barStyleV1 = {
20 | {
21 | { // bottomANDmask
22 | 0b00100,
23 | 0b00100,
24 | 0b00100,
25 | 0b00100,
26 | 0b00100,
27 | 0b00100,
28 | 0b00000,
29 | 0b00000},
30 | { // bottomORmask
31 | 0b10001,
32 | 0b10001,
33 | 0b10001,
34 | 0b10001,
35 | 0b10001,
36 | 0b10001,
37 | 0b10001,
38 | 0b11111}
39 | },
40 | {
41 | { // topANDmask
42 | 0b00000,
43 | 0b00000,
44 | 0b00100,
45 | 0b00100,
46 | 0b00100,
47 | 0b00100,
48 | 0b00100,
49 | 0b00100},
50 | { // topORmask
51 | 0b11111,
52 | 0b10001,
53 | 0b10001,
54 | 0b10001,
55 | 0b10001,
56 | 0b10001,
57 | 0b10001,
58 | 0b10001}
59 | },
60 | {
61 | { // middleANDmask
62 | 0b00100,
63 | 0b00100,
64 | 0b00100,
65 | 0b00100,
66 | 0b00100,
67 | 0b00100,
68 | 0b00100,
69 | 0b00100},
70 | { // middleORmask
71 | 0b10001,
72 | 0b10001,
73 | 0b10001,
74 | 0b10001,
75 | 0b10001,
76 | 0b10001,
77 | 0b10001,
78 | 0b10001}
79 | },
80 | 2, // BottomOffset
81 | 2, // TopOffset
82 | 1 // orientation...
83 | };
84 |
85 |
86 | #endif // BAR_STYLE_V_1
87 |
--------------------------------------------------------------------------------
/src/BarStyleV2.h:
--------------------------------------------------------------------------------
1 | #ifndef BAR_STYLE_V_2
2 | #define BAR_STYLE_V_2
3 |
4 | // Contains the bit masks defining a style for a smooth progress bar
5 | // to be used with SmoothProgress library
6 | // https://github.com/Gjorgjevikj/SmoothProgress.git
7 | //
8 | // Defines a vertical smooth progress bar in square frame
9 | // 1 pixel frame, 1 pixel margin to frame, rounded edges
10 |
11 | #include
12 |
13 | #if (defined BAR_STYLE_V_2_IN_PROGMEM) || (defined BAR_STYLES_IN_PROGMEM)
14 | static const PROGMEM struct barstyle
15 | #else
16 | static const struct barstyle
17 | #endif
18 |
19 | barStyleV2 = {
20 | {
21 | { // bottomANDmask
22 | 0b01110,
23 | 0b01110,
24 | 0b01110,
25 | 0b01110,
26 | 0b01110,
27 | 0b01110,
28 | 0b01110,
29 | 0b00000},
30 | { // bottomORmask
31 | 0b10001,
32 | 0b10001,
33 | 0b10001,
34 | 0b10001,
35 | 0b10001,
36 | 0b10001,
37 | 0b10001,
38 | 0b01110}
39 | },
40 | {
41 | { // topANDmask
42 | 0b00000,
43 | 0b01110,
44 | 0b01110,
45 | 0b01110,
46 | 0b01110,
47 | 0b01110,
48 | 0b01110,
49 | 0b01110},
50 | { // topORmask
51 | 0b01110,
52 | 0b10001,
53 | 0b10001,
54 | 0b10001,
55 | 0b10001,
56 | 0b10001,
57 | 0b10001,
58 | 0b10001}
59 | },
60 | {
61 | { // middleANDmask
62 | 0b01110,
63 | 0b01110,
64 | 0b01110,
65 | 0b01110,
66 | 0b01110,
67 | 0b01110,
68 | 0b01110,
69 | 0b01110},
70 | { // middleORmask
71 | 0b10001,
72 | 0b10001,
73 | 0b10001,
74 | 0b10001,
75 | 0b10001,
76 | 0b10001,
77 | 0b10001,
78 | 0b10001}
79 | },
80 | 1, // BottomOffset
81 | 1, // TopOffset
82 | 1 // orientation...
83 | };
84 |
85 |
86 | #endif // BAR_STYLE_V_2
87 |
--------------------------------------------------------------------------------
/examples/VericalProgessBarTemp/VericalProgessBarTemp.ino:
--------------------------------------------------------------------------------
1 | /**
2 | * @file VericalProgessBarTemp.ino
3 | * @ingroup examples
4 | * @brief 4 vertical temperature
5 | *
6 | *
7 | */
8 |
9 | #include
10 | #include
11 |
12 | #define BAR_STYLES_IN_PROGMEM
13 | #include
14 |
15 | LiquidCrystal_I2C lcd(0x27, 20, 4);
16 | LCD dispA(lcd, inPROGMEM(barStyleVT));
17 |
18 | // Create the object representing the smooth progress bar
19 | SmoothProgressBar temp[] = {
20 | SmoothProgressBar(dispA, 3, 4, 3, 0),
21 | SmoothProgressBar(dispA, 3, 9, 3, 1),
22 | SmoothProgressBar(dispA, 3, 14, 3, 2),
23 | SmoothProgressBar(dispA, 4, 19, 3, 3)
24 | };
25 |
26 | void setup()
27 | {
28 | lcd.init();
29 | lcd.backlight();
30 | lcd.print("4 Temperatures");
31 |
32 | dispA.begin();
33 |
34 | delay(2000);
35 | lcd.clear();
36 | }
37 |
38 | float tm = 0.0, phi;
39 | char buffer[16];
40 | int i, val[4];
41 | const char* title[5] = { "CPU", "GPU", "PSU", "Case" };
42 |
43 | void loop()
44 | {
45 | // simulate some values
46 | for(i=0, phi = 0; i<4; i++, phi+=M_PI_4)
47 | val[i] = sin(tm+phi) * 10 + 11;
48 |
49 | val[3] += 5;
50 |
51 | for (i = 0; i < 3; i++)
52 | {
53 | temp[i].showProgress(val[i]);
54 | sprintf(buffer, "%3d\337", val[i]);
55 | lcd.setCursor(i*5+1, 0); // move cursor to top left
56 | lcd.print(title[i]); // print the string on the display
57 | lcd.setCursor(i * 5, 1); // move cursor to top left
58 | lcd.print(buffer); // print the string on the display
59 | }
60 |
61 | temp[3].showProgress(val[3]);
62 | sprintf(buffer, "%3d\337", val[3]);
63 | lcd.setCursor(i * 5, 0); // move cursor to top left
64 | lcd.print(title[3]); // print the string on the display
65 | lcd.setCursor(i * 5, 1); // move cursor to top left
66 | lcd.print(buffer); // print the string on the display
67 |
68 | tm += 0.1;
69 | }
70 |
71 |
--------------------------------------------------------------------------------
/src/BarStyleBAT.h:
--------------------------------------------------------------------------------
1 | #ifndef BAR_STYLE_BAT
2 | #define BAR_STYLE_BAT
3 |
4 | // Contains the bit masks defining a style for a smooth progress bar
5 | // to be used with SmoothProgress library
6 | // https://github.com/Gjorgjevikj/SmoothProgress.git
7 | //
8 | // Defines a smooth horizontal progress bar representing a battery
9 | // 1 pixel frame, 1 pixel margin, 5 pixel offsets
10 |
11 | #include
12 |
13 | #if (defined BAR_STYLE_BAT_IN_PROGMEM) || (defined BAR_STYLES_IN_PROGMEM)
14 | static const PROGMEM struct barstyle
15 | #else
16 | static const struct barstyle
17 | #endif
18 |
19 | barStyleBat = {
20 | {
21 | { // lANDmask
22 | 0b00001,
23 | 0b00001,
24 | 0b00001,
25 | 0b00001,
26 | 0b00001,
27 | 0b00001,
28 | 0b00001,
29 | 0b00001},
30 | { // leftORmask
31 | 0b00001,
32 | 0b00001,
33 | 0b00001,
34 | 0b00001,
35 | 0b00001,
36 | 0b00001,
37 | 0b00001,
38 | 0b00001},
39 | },
40 | {
41 | { // rightANDmask
42 | 0b10000,
43 | 0b10000,
44 | 0b11100,
45 | 0b11100,
46 | 0b11100,
47 | 0b11100,
48 | 0b10000,
49 | 0b10000},
50 | { // rightORmask
51 | 0b10000,
52 | 0b10000,
53 | 0b11100,
54 | 0b11100,
55 | 0b11100,
56 | 0b11100,
57 | 0b10000,
58 | 0b10000},
59 | },
60 | {
61 | { // middleANDmask
62 | 0b00000,
63 | 0b00000,
64 | 0b11111,
65 | 0b11111,
66 | 0b11111,
67 | 0b11111,
68 | 0b00000,
69 | 0b00000},
70 | { // middleORmask
71 | 0b11111,
72 | 0b00000,
73 | 0b00000,
74 | 0b00000,
75 | 0b00000,
76 | 0b00000,
77 | 0b00000,
78 | 0b11111},
79 | },
80 | 5, // LeftOffset
81 | 5, // RightOffset
82 | 0 // direction...
83 | };
84 |
85 |
86 | #endif // !BAR_STYLE_BAT
87 |
--------------------------------------------------------------------------------
/src/BarStyleBat0.h:
--------------------------------------------------------------------------------
1 | #ifndef BAR_STYLE_BAT0
2 | #define BAR_STYLE_BAT0
3 |
4 | // Contains the bit masks defining a style for a smooth progress bar
5 | // to be used with SmoothProgress library
6 | // https://github.com/Gjorgjevikj/SmoothProgress.git
7 | //
8 | // Defines a smooth horizontal progress bar representing a battery
9 | // 1 pixel frame, 1 pixel margin, 2 pixel offsets
10 |
11 | #include
12 |
13 | #if (defined BAR_STYLE_BAT0_IN_PROGMEM) || (defined BAR_STYLES_IN_PROGMEM)
14 | static const PROGMEM struct barstyle
15 | #else
16 | static const struct barstyle
17 | #endif
18 |
19 | barStyleBat0 = {
20 | {
21 | { // lANDmask
22 | 0b00000,
23 | 0b00000,
24 | 0b00111,
25 | 0b00111,
26 | 0b00111,
27 | 0b00111,
28 | 0b00000,
29 | 0b00000},
30 | { // leftORmask
31 | 0b11111,
32 | 0b10000,
33 | 0b10000,
34 | 0b10000,
35 | 0b10000,
36 | 0b10000,
37 | 0b10000,
38 | 0b11111},
39 | },
40 | {
41 | { // rightANDmask
42 | 0b00000,
43 | 0b00000,
44 | 0b10000,
45 | 0b10000,
46 | 0b10000,
47 | 0b10000,
48 | 0b00000,
49 | 0b00000},
50 | { // rightORmask
51 | 0b11100,
52 | 0b00100,
53 | 0b00111,
54 | 0b00111,
55 | 0b00111,
56 | 0b00111,
57 | 0b00100,
58 | 0b11100},
59 | },
60 | {
61 | { // middleANDmask
62 | 0b00000,
63 | 0b00000,
64 | 0b11111,
65 | 0b11111,
66 | 0b11111,
67 | 0b11111,
68 | 0b00000,
69 | 0b00000},
70 | { // middleORmask
71 | 0b11111,
72 | 0b00000,
73 | 0b00000,
74 | 0b00000,
75 | 0b00000,
76 | 0b00000,
77 | 0b00000,
78 | 0b11111},
79 | },
80 | 2, // LeftOffset
81 | 4, // RightOffset
82 | 0 // direction...
83 | };
84 |
85 |
86 | #endif // !BAR_STYLE_BAT0
87 |
--------------------------------------------------------------------------------
/src/BarStyleBat1.h:
--------------------------------------------------------------------------------
1 | #ifndef BAR_STYLE_BAT1
2 | #define BAR_STYLE_BAT1
3 |
4 | // Contains the bit masks defining a style for a smooth progress bar
5 | // to be used with SmoothProgress library
6 | // https://github.com/Gjorgjevikj/SmoothProgress.git
7 | //
8 | // Defines a smooth horizontal progress bar representing a battery
9 | // 1 pixel frame, 1 pixel margin, 2 pixel offsets
10 |
11 | #include
12 |
13 | #if (defined BAR_STYLE_BAT1_IN_PROGMEM) || (defined BAR_STYLES_IN_PROGMEM)
14 | static const PROGMEM struct barstyle
15 | #else
16 | static const struct barstyle
17 | #endif
18 |
19 | barStyleBat1 = {
20 | {
21 | { // lANDmask
22 | 0b00000,
23 | 0b01111,
24 | 0b01111,
25 | 0b01111,
26 | 0b01111,
27 | 0b01111,
28 | 0b01111,
29 | 0b00000},
30 | { // leftORmask
31 | 0b11111,
32 | 0b10000,
33 | 0b10000,
34 | 0b10000,
35 | 0b10000,
36 | 0b10000,
37 | 0b10000,
38 | 0b11111},
39 | },
40 | {
41 | { // rightANDmask
42 | 0b00000,
43 | 0b11000,
44 | 0b11000,
45 | 0b11000,
46 | 0b11000,
47 | 0b11000,
48 | 0b11000,
49 | 0b00000},
50 | { // rightORmask
51 | 0b11100,
52 | 0b00100,
53 | 0b00111,
54 | 0b00111,
55 | 0b00111,
56 | 0b00111,
57 | 0b00100,
58 | 0b11100},
59 | },
60 | {
61 | { // middleANDmask
62 | 0b00000,
63 | 0b11111,
64 | 0b11111,
65 | 0b11111,
66 | 0b11111,
67 | 0b11111,
68 | 0b11111,
69 | 0b00000},
70 | { // middleORmask
71 | 0b11111,
72 | 0b00000,
73 | 0b00000,
74 | 0b00000,
75 | 0b00000,
76 | 0b00000,
77 | 0b00000,
78 | 0b11111},
79 | },
80 | 1, // LeftOffset
81 | 3, // RightOffset
82 | 0 // direction...
83 | };
84 |
85 |
86 | #endif // !BAR_STYLE_BAT1
87 |
--------------------------------------------------------------------------------
/src/BarStyleBatV.h:
--------------------------------------------------------------------------------
1 | #ifndef BAR_STYLE_BAT_V
2 | #define BAR_STYLE_BAT_V
3 |
4 | // Contains the bit masks defining a style for a smooth progress bar
5 | // to be used with SmoothProgress library
6 | // https://github.com/Gjorgjevikj/SmoothProgress.git
7 | //
8 | // Defines a smooth vertical progress bar representing a battery
9 | // 1 pixel frame, no margin, 1 pixel offsets
10 |
11 | #include
12 |
13 | #if (defined BAR_STYLE_BAT_V_IN_PROGMEM) || (defined BAR_STYLES_IN_PROGMEM)
14 | static const PROGMEM struct barstyle
15 | #else
16 | static const struct barstyle
17 | #endif
18 |
19 | barStyleBatV = {
20 | {
21 | { // bottomANDmask
22 | 0b11111,
23 | 0b11111,
24 | 0b11111,
25 | 0b11111,
26 | 0b11111,
27 | 0b11111,
28 | 0b11111,
29 | 0b11111},
30 | { // bottomORmask
31 | 0b10001,
32 | 0b10001,
33 | 0b10001,
34 | 0b10001,
35 | 0b10001,
36 | 0b10001,
37 | 0b10001,
38 | 0b11111}
39 | },
40 | {
41 | { // topANDmask
42 | 0b00000,
43 | 0b00000,
44 | 0b01110,
45 | 0b01110,
46 | 0b01110,
47 | 0b01110,
48 | 0b01110,
49 | 0b01110},
50 | { // topORmask
51 | 0b01110,
52 | 0b11111,
53 | 0b10001,
54 | 0b10001,
55 | 0b10001,
56 | 0b10001,
57 | 0b10001,
58 | 0b10001}
59 | },
60 | {
61 | { // middleANDmask
62 | 0b01110,
63 | 0b01110,
64 | 0b01110,
65 | 0b01110,
66 | 0b01110,
67 | 0b01110,
68 | 0b01110,
69 | 0b01110},
70 | { // middleORmask
71 | 0b10001,
72 | 0b10001,
73 | 0b10001,
74 | 0b10001,
75 | 0b10001,
76 | 0b10001,
77 | 0b10001,
78 | 0b10001}
79 | },
80 | 1, // BootmOffset
81 | 2, // TopOffset
82 | 1 // direction...
83 | };
84 |
85 |
86 | #endif // !BAR_STYLE_BAT_V
87 |
--------------------------------------------------------------------------------
/src/BarStyleSS.h:
--------------------------------------------------------------------------------
1 | #ifndef BAR_STYLE_SS
2 | #define BAR_STYLE_SS
3 |
4 | // Contains the bit masks defining a style for a smooth progress bar
5 | // to be used with SmoothProgress library
6 | // https://github.com/Gjorgjevikj/SmoothProgress.git
7 | //
8 | // Defines a smooth horizontal progress bar representing a signal strength
9 | // for fixed 3 characters length no frame, no margin, no offsets
10 |
11 | #include
12 |
13 | #if (defined BAR_STYLE_SS_IN_PROGMEM) || (defined BAR_STYLES_IN_PROGMEM)
14 | static const PROGMEM struct barstyle
15 | #else
16 | static const struct barstyle
17 | #endif
18 |
19 | barStyleSS = {
20 | {
21 | { // leftANDmask
22 | 0b00000,
23 | 0b00000,
24 | 0b00000,
25 | 0b00000,
26 | 0b00000,
27 | 0b00011,
28 | 0b01111,
29 | 0b11111},
30 | { // leftORmask
31 | 0b00000,
32 | 0b00000,
33 | 0b00000,
34 | 0b00000,
35 | 0b00000,
36 | 0b00000,
37 | 0b00000,
38 | 0b00000},
39 | },
40 | {
41 | { // rightANDmask
42 | 0b00011,
43 | 0b01111,
44 | 0b11111,
45 | 0b11111,
46 | 0b11111,
47 | 0b11111,
48 | 0b11111,
49 | 0b11111},
50 | { // rightORmask
51 | 0b00000,
52 | 0b00000,
53 | 0b00000,
54 | 0b00000,
55 | 0b00000,
56 | 0b00000,
57 | 0b00000,
58 | 0b00000},
59 | },
60 | {
61 | { // middleANDmask
62 | 0b00000,
63 | 0b00000,
64 | 0b00001,
65 | 0b00111,
66 | 0b11111,
67 | 0b11111,
68 | 0b11111,
69 | 0b11111},
70 | { // mORmask
71 | 0b00000,
72 | 0b00000,
73 | 0b00000,
74 | 0b00000,
75 | 0b00000,
76 | 0b00000,
77 | 0b00000,
78 | 0b00000},
79 | },
80 | 0, // BootmOffset
81 | 0, // TopOffset
82 | 0 // direction...
83 | };
84 |
85 | #endif // !BAR_STYLE_SS
86 |
--------------------------------------------------------------------------------
/src/BarStyleVT.h:
--------------------------------------------------------------------------------
1 | #ifndef BAR_STYLE_V_T
2 | #define BAR_STYLE_V_T
3 |
4 | // Contains the bit masks defining a style for a smooth progress bar
5 | // to be used with SmoothProgress library
6 | // https://github.com/Gjorgjevikj/SmoothProgress.git
7 | //
8 | // Defines a vertical smooth progress bar for temperature gauge
9 | // 1 pixel frame, 1 pixel margin to frame, rounded edges
10 |
11 | #include
12 |
13 | #if (defined BAR_STYLE_V_T_IN_PROGMEM) || (defined BAR_STYLES_IN_PROGMEM)
14 | static const PROGMEM struct barstyle
15 | #else
16 | static const struct barstyle
17 | #endif
18 |
19 | barStyleVT = {
20 | {
21 | { // bottomANDmask
22 | 0b00100,
23 | 0b00100,
24 | 0b00100,
25 | 0b00100,
26 | 0b01110,
27 | 0b01110,
28 | 0b01110,
29 | 0b00000},
30 | { // bottomORmask
31 | 0b01010,
32 | 0b01010,
33 | 0b01010,
34 | 0b01010,
35 | 0b10001,
36 | 0b10001,
37 | 0b10001,
38 | 0b01110}
39 | },
40 | {
41 | { // topANDmask
42 | 0b00000,
43 | 0b00100,
44 | 0b00100,
45 | 0b00100,
46 | 0b00100,
47 | 0b00100,
48 | 0b00100,
49 | 0b00100},
50 | { // topORmask
51 | 0b00100,
52 | 0b01010,
53 | 0b01010,
54 | 0b01010,
55 | 0b01010,
56 | 0b01010,
57 | 0b01010,
58 | 0b01010}
59 | },
60 | {
61 | { // middleANDmask
62 | 0b00100,
63 | 0b00100,
64 | 0b00100,
65 | 0b00100,
66 | 0b00100,
67 | 0b00100,
68 | 0b00100,
69 | 0b00100},
70 | { // middleORmask
71 | 0b01010,
72 | 0b01010,
73 | 0b01010,
74 | 0b01010,
75 | 0b01010,
76 | 0b01010,
77 | 0b01010,
78 | 0b01010}
79 | },
80 | 1, // BottomOffset
81 | 1, // TopOffset
82 | 1 // orientation...
83 | };
84 |
85 |
86 | #endif // BAR_STYLE_V_T
87 |
--------------------------------------------------------------------------------
/examples/FourPB/FourPB.ino:
--------------------------------------------------------------------------------
1 | /**
2 | * @file FourPB.ino
3 | * @ingroup examples
4 | * @brief Display 4 horizontal smooth progress bars on a single display
5 | *
6 | * This example shows how to display a four horizontal smooth progress bar on a character LCD display.
7 | */
8 |
9 | #include
10 | #include
11 |
12 | // SmoothProgress supports different styles, each stored in separate .h file that should be included next
13 | // Let's include the style for horizontal progress bar as in a square frame with 1 pixel margin
14 | #include
15 |
16 | // Define the lcd object for the display according to the used LCD library
17 | LiquidCrystal_I2C lcd(0x27, 16, 2); // set the LCD address to 0x27 for a 16 chars and 2 line display
18 |
19 | // The library supports multiple progress bars (up to 4) on a single display, different styles and multiple displays
20 | // but the hardware limitation of these displays dictates that all progress bars on a single display have to share the same style
21 | // Create the association between the lcd display and the progress bar style
22 | // as a bar_display (LCD) object dispA to be used when creating the smooth progress bar object
23 | LCD dispA(lcd, barStyle2);
24 |
25 | // Create the objects representing the smooth progress bars (numbered 0 to 3)
26 | // should not overlap, minimum supported width is 2
27 | SmoothProgressBar spb0(dispA, 10, 0, 0, 0);
28 | SmoothProgressBar spb1(dispA, 4, 11, 0, 1);
29 | SmoothProgressBar spb2(dispA, 8, 1, 1, 2);
30 | SmoothProgressBar spb3(dispA, 6, 10, 1, 3);
31 |
32 | void setup()
33 | {
34 | lcd.init(); // do the usual lcd initialization for the used liquid crystal library
35 |
36 | lcd.backlight(); // enable backlight for the LCD module
37 | lcd.print("4 smooth progress bars");
38 |
39 | // also initialize the bar_display object (loads the style)
40 | dispA.begin();
41 |
42 | delay(2000);
43 | lcd.clear();
44 | }
45 |
46 | int mc = 0;
47 | int p1 = 0, p2 = 0, p3 = 0, p4 = 0;
48 |
49 | void loop()
50 | {
51 | spb0.showProgressPct(p1);
52 | spb1.showProgressPct(p2);
53 | spb2.showProgressPct(p3);
54 | spb3.showProgressPct(p4);
55 |
56 | p1 = (mc++)%101;
57 | if (mc % 2 == 0)
58 | p2++;
59 | if (mc % 3 == 0)
60 | p3++;
61 | if (mc % 5 == 0)
62 | p4++;
63 |
64 | if (p1 > 100)
65 | p1 = 0;
66 | if (p2 > 100)
67 | p2 = 0;
68 | if (p3 > 100)
69 | p3 = 0;
70 | if (p4 > 100)
71 | p4 = 0;
72 |
73 | delay(5);
74 | }
75 |
76 |
--------------------------------------------------------------------------------
/docs/html/search/mag_sel.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
75 |
--------------------------------------------------------------------------------
/src/barstyle.h:
--------------------------------------------------------------------------------
1 | #ifndef BAR_STYLE_STRUCT
2 | #define BAR_STYLE_STRUCT
3 |
4 | // Part of the SmoothProgress library for Arduino
5 | // Defines a structure containing bit-masks defining a style for a smooth progress bar
6 | // to be used with SmoothProgress library
7 | // https://github.com/Gjorgjevikj/SmoothProgress.git
8 |
9 | // some utility functions ...
10 | // creates bit-mask with N LSB bits set to 1
11 | template
12 | constexpr uint8_t MaskLSBs()
13 | {
14 | return MaskLSBs() << 1 | 1;
15 | }
16 |
17 | template <>
18 | constexpr uint8_t MaskLSBs<0>()
19 | {
20 | return 0;
21 | }
22 |
23 | template <>
24 | constexpr uint8_t MaskLSBs<1>()
25 | {
26 | return 1;
27 | }
28 |
29 | ///
30 | /// Structure holding the bit-masks and other data used for drawing the edges of the progress bar that define the appearance (style) of the progress bar
31 | /// startMask[2][CharPatRows] - AND and OR mask for the first (beginning) character of the progress bar
32 | /// endMask[2][CharPatRows] - AND and OR mask for the last (ending) character of the progress bar
33 | /// middleMask[2][CharPatRows] - AND and OR mask for the advancing (partially filled) character of the progress bar
34 | /// the AND mask defines which pixels to be left on when filling the progress bar (and which should always be off - defining the margin to the frame)
35 | /// the OR mask defines which pixels will always be on - defining the frame of the progress bar
36 | /// startOffset - defines where the filling of the progress bar actually starts (regarding the frame and the margin of the style)
37 | /// endOffset - defines where the filling of the progress bar ends (regarding the frame and the margin of the style)
38 | ///
39 | struct barstyle
40 | {
41 | enum dotMatrixDim : byte { CharPatRows = 8, CharPatCols = 5 };
42 | enum bitMasks : byte { AllRows = MaskLSBs(), AllCols = MaskLSBs() };
43 | enum andOrMaskIndex : byte { ANDmask, ORmask };
44 | enum orientation : byte { Horizontal, Vertical }; // Progress bar orientation
45 | uint8_t startMask[2][CharPatRows]; // Left/Bottom-AND+OR mask
46 | uint8_t endMask[2][CharPatRows]; // Right/Top-AND+OR mask
47 | uint8_t middleMask[2][CharPatRows]; // Middle-AND+OR mask
48 | struct bspar // where the filling of the progress bar actually starts/ends considering that some pixels are taken for the frame
49 | {
50 | unsigned char startOffset : 3;
51 | unsigned char endOffset : 3;
52 | unsigned char dir : 2; // used for orientation (possibly direction ...)
53 | } stylePar;
54 | };
55 |
56 | // character creator - https://tusindfryd.github.io/screenduino/
57 | // another character creator - https://maxpromer.github.io/LCD-Character-Creator/
58 |
59 |
60 | #endif //BAR_STYLE_STRUCT
--------------------------------------------------------------------------------
/docs/html/navtree.css:
--------------------------------------------------------------------------------
1 | #nav-tree .children_ul {
2 | margin:0;
3 | padding:4px;
4 | }
5 |
6 | #nav-tree ul {
7 | list-style:none outside none;
8 | margin:0px;
9 | padding:0px;
10 | }
11 |
12 | #nav-tree li {
13 | white-space:nowrap;
14 | margin:0px;
15 | padding:0px;
16 | }
17 |
18 | #nav-tree .plus {
19 | margin:0px;
20 | }
21 |
22 | #nav-tree .selected {
23 | background-image: url('tab_a.png');
24 | background-repeat:repeat-x;
25 | color: #fff;
26 | text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0);
27 | }
28 |
29 | #nav-tree img {
30 | margin:0px;
31 | padding:0px;
32 | border:0px;
33 | vertical-align: middle;
34 | }
35 |
36 | #nav-tree a {
37 | text-decoration:none;
38 | padding:0px;
39 | margin:0px;
40 | outline:none;
41 | }
42 |
43 | #nav-tree .label {
44 | margin:0px;
45 | padding:0px;
46 | font: 12px 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif;
47 | }
48 |
49 | #nav-tree .label a {
50 | padding:2px;
51 | }
52 |
53 | #nav-tree .selected a {
54 | text-decoration:none;
55 | color:#fff;
56 | }
57 |
58 | #nav-tree .children_ul {
59 | margin:0px;
60 | padding:0px;
61 | }
62 |
63 | #nav-tree .item {
64 | margin:0px;
65 | padding:0px;
66 | }
67 |
68 | #nav-tree {
69 | padding: 0px 0px;
70 | background-color: #FAFAFF;
71 | font-size:14px;
72 | overflow:auto;
73 | }
74 |
75 | #doc-content {
76 | overflow:auto;
77 | display:block;
78 | padding:0px;
79 | margin:0px;
80 | -webkit-overflow-scrolling : touch; /* iOS 5+ */
81 | }
82 |
83 | #side-nav {
84 | padding:0 6px 0 0;
85 | margin: 0px;
86 | display:block;
87 | position: absolute;
88 | left: 0px;
89 | width: 250px;
90 | overflow : hidden;
91 | }
92 |
93 | .ui-resizable .ui-resizable-handle {
94 | display:block;
95 | }
96 |
97 | .ui-resizable-e {
98 | background-image:url("splitbar.png");
99 | background-size:100%;
100 | background-repeat:repeat-y;
101 | background-attachment: scroll;
102 | cursor:ew-resize;
103 | height:100%;
104 | right:0;
105 | top:0;
106 | width:6px;
107 | }
108 |
109 | .ui-resizable-handle {
110 | display:none;
111 | font-size:0.1px;
112 | position:absolute;
113 | z-index:1;
114 | }
115 |
116 | #nav-tree-contents {
117 | margin: 6px 0px 0px 0px;
118 | }
119 |
120 | #nav-tree {
121 | background-image:url('nav_h.png');
122 | background-repeat:repeat-x;
123 | background-color: #F9FAFC;
124 | -webkit-overflow-scrolling : touch; /* iOS 5+ */
125 | }
126 |
127 | #nav-sync {
128 | position:absolute;
129 | top:5px;
130 | right:24px;
131 | z-index:0;
132 | }
133 |
134 | #nav-sync img {
135 | opacity:0.3;
136 | }
137 |
138 | #nav-sync img:hover {
139 | opacity:0.9;
140 | }
141 |
142 | @media print
143 | {
144 | #nav-tree { display: none; }
145 | div.ui-resizable-handle { display: none; position: relative; }
146 | }
147 |
148 |
--------------------------------------------------------------------------------
/docs/html/navtreeindex0.js:
--------------------------------------------------------------------------------
1 | var NAVTREEINDEX0 =
2 | {
3 | "_bar_style0_8h_source.html":[1,0,0,1],
4 | "_bar_style1_8h_source.html":[1,0,0,2],
5 | "_bar_style2_8h_source.html":[1,0,0,3],
6 | "_bar_style3_8h_source.html":[1,0,0,4],
7 | "_bar_style4_8h_source.html":[1,0,0,5],
8 | "_bar_style_b_a_t_8h_source.html":[1,0,0,6],
9 | "_bar_style_bat0_8h_source.html":[1,0,0,7],
10 | "_bar_style_bat1_8h_source.html":[1,0,0,8],
11 | "_bar_style_bat_v_8h_source.html":[1,0,0,9],
12 | "_bar_style_g1_8h_source.html":[1,0,0,10],
13 | "_bar_style_s_s_8h_source.html":[1,0,0,11],
14 | "_bar_style_v0_8h_source.html":[1,0,0,12],
15 | "_bar_style_v1_8h_source.html":[1,0,0,13],
16 | "_bar_style_v2_8h_source.html":[1,0,0,14],
17 | "_bar_style_v_t_8h_source.html":[1,0,0,15],
18 | "_smooth_progress_8h_source.html":[1,0,0,16],
19 | "annotated.html":[0,0],
20 | "barstyle_8h_source.html":[1,0,0,0],
21 | "class_bar_display.html":[0,0,0],
22 | "class_bar_display.html#a03e3db54285d9c79ac16c308e268dd3c":[0,0,0,7],
23 | "class_bar_display.html#a11f57163eb558cc034ee5654ccecec3f":[0,0,0,13],
24 | "class_bar_display.html#a59679ed750d6c772600a26996b942653":[0,0,0,14],
25 | "class_bar_display.html#a6611acc751ad3ab19b778ebc7bd69043":[0,0,0,5],
26 | "class_bar_display.html#aaa44ab29f287355687fb6040060c3bf9":[0,0,0,9],
27 | "class_bar_display.html#aaf517cb38e88f69bc0580b27c60123d3":[0,0,0,8],
28 | "class_bar_display.html#ac00fba603431ff81449e44dfaa1656ad":[0,0,0,2],
29 | "class_bar_display.html#ac1f02154e1ba1dd8dcc026e582baacd6":[0,0,0,1],
30 | "class_bar_display.html#ac6ac9be118c6cb7567e60ee61a6ac92b":[0,0,0,3],
31 | "class_bar_display.html#ad3af8ec1a091493b250fc56a868a195a":[0,0,0,6],
32 | "class_bar_display.html#ad4cb2afe0757e7dd7f2a76fd61e0f27b":[0,0,0,4],
33 | "class_bar_display.html#ae22868de4a545e9bbf6859b9306adffc":[0,0,0,12],
34 | "class_bar_display.html#ae49d9f17735646fc9bdd9a615558231e":[0,0,0,10],
35 | "class_bar_display.html#af4d5edd9d5d3adc815bab9e6e51802a2":[0,0,0,0],
36 | "class_bar_display.html#afb42bca3cce2e82eb96b35783e4711eb":[0,0,0,11],
37 | "class_bar_pos.html":[0,0,1],
38 | "class_bar_pos.html#a324ecba9d3a204da70e56cc217cca278":[0,0,1,4],
39 | "class_bar_pos.html#a3297a1a5765897d6fa04c64853061ef3":[0,0,1,1],
40 | "class_bar_pos.html#a5aff43abf0f8b3eb96ba25cf6eb24efa":[0,0,1,5],
41 | "class_bar_pos.html#a9aa0f50b6586d1d96fcbcf1f0b8c423f":[0,0,1,3],
42 | "class_bar_pos.html#aaabcd895df5c381356a146e498f00b63":[0,0,1,6],
43 | "class_bar_pos.html#aaf8939b23c1b3538d562bcd534aae818":[0,0,1,2],
44 | "class_progress_bar.html":[0,0,4],
45 | "class_progress_bar.html#a5e0c5c9a07872303b768c1c22909f4f6":[0,0,4,1],
46 | "class_progress_bar.html#a67c6761d0e9817a4dbc3381856bc5580":[0,0,4,3],
47 | "class_progress_bar.html#a85da155f56e3f2a2699d80555cf7ada7":[0,0,4,0],
48 | "class_progress_bar.html#acb6a36ab34b20c23c54463cb38172227":[0,0,4,4],
49 | "class_progress_bar.html#af67867b28868a34cb58bdc8e9d6008d3":[0,0,4,2],
50 | "classes.html":[0,1],
51 | "classin_p_r_o_g_m_e_m.html":[0,0,3],
52 | "classin_p_r_o_g_m_e_m.html#aff07cd7ab79e471034fe2626e8bab456":[0,0,3,0],
53 | "dir_68267d1309a1af8e8297ef4c3efbcdba.html":[1,0,0],
54 | "files.html":[1,0],
55 | "functions.html":[0,3,0],
56 | "functions_func.html":[0,3,1],
57 | "hierarchy.html":[0,2],
58 | "index.html":[],
59 | "pages.html":[],
60 | "struct_bar_pos_1_1_prog_bar_par.html":[0,0,1,0],
61 | "structbarstyle.html":[0,0,2],
62 | "structbarstyle_1_1bspar.html":[0,0,2,0]
63 | };
64 |
--------------------------------------------------------------------------------
/examples/VericalProgessBar/VericalProgessBar.ino:
--------------------------------------------------------------------------------
1 | /**
2 | * @file VericalProgessBar.ino
3 | * @ingroup examples
4 | * @brief Display 2 vertical smooth progress bars on a 20x4 LCD display
5 | *
6 | * This example shows how to display a two vertical smooth progress bar on a character LCD display.
7 | */
8 |
9 | // Wiring
10 | // For serial (I2C) wiring follow the recommendations for your adapter board
11 | // or for the most common boards you can find a guide at https://create.arduino.cc/projecthub/arduino_uno_guy/i2c-liquid-crystal-displays-5b806c
12 |
13 | //First include the Liquid Crystal library or
14 | #include
15 | // than include the Smooth progress bars library
16 | #include
17 |
18 | // SmoothProgress supports different styles, each stored in separate .h file that should be included next
19 | // Let's include the style for horizontal progress bar as in a rounded frame with 1 pixel margin
20 | // To use the program (flash) memory (A.K.A. PROGMEM) for storing the masks that define the style of the progress bar (and save some RAM memory)
21 | // insert #define BAR_STYLE_<#>_IN_PROGMEM before including the corresponding header with the style
22 | // do not forget to use the wrapper when passing the style structure to barstyle constructor
23 | // Include a style for vertical smooth progress bars
24 | #define BAR_STYLES_IN_PROGMEM
25 | #include
26 |
27 | // Define the lcd object for the display as usual
28 | LiquidCrystal_I2C lcd(0x27, 20, 4); // set the LCD address to 0x27 for a 20 chars and 4 line display
29 |
30 | // The library supports multiple progress bars (up to 4) on a single display, different styles and multiple displays
31 | // but the hardware limitation of these displays dictates that all progress bars on a single display have to share the same style
32 | // Create the association between the lcd display and the progress bar style
33 | // as a bar_display (LCD) object dispA to be used when creating the smooth progress bar object
34 | // If the style is stored in PROGMEM use the inPROGMEM wrapper !!!
35 | LCD dispA(lcd, inPROGMEM(barStyleV2));
36 |
37 | // Create the object representing the smooth progress bar
38 | SmoothProgressBar spb1(dispA, 3, 1, 3, 0); // progress bar 3 characters high, at 3-th row, 0-th column, as progress bar 0
39 | SmoothProgressBar spb2(dispA, 4, 19, 3, 1); // progress bar 4 characters high, at 1-th row, 0-th column, as progress bar 1
40 |
41 | void setup()
42 | {
43 | // do the usual lcd initialization for the used liquid crystal library
44 | lcd.init();
45 |
46 | lcd.backlight(); // enable backlight for the LCD module
47 | lcd.print("Vertical ProgressBar");
48 |
49 | // also initialize the bar_display object (loads the style)
50 | dispA.begin();
51 |
52 | delay(2000);
53 | lcd.clear();
54 |
55 | lcd.setCursor(5, 0);
56 | lcd.print("Vertical");
57 | lcd.setCursor(6, 1);
58 | lcd.print("Smooth");
59 | lcd.setCursor(5, 2);
60 | lcd.print("Progress");
61 | lcd.setCursor(7, 3);
62 | lcd.print("Bars");
63 | }
64 |
65 | int b1 = 0, b2 = 0;
66 | char buffer[16]; // helper buffer to store C-style strings (generated with sprintf function)
67 |
68 | void loop()
69 | {
70 | sprintf(buffer, "%3d%%", b1);
71 | lcd.setCursor(0, 0); // move cursor to top left
72 | lcd.print(buffer); // print the string on the display
73 | sprintf(buffer, "%3d%%", b2);
74 | lcd.setCursor(14, 2); // move cursor on the right
75 | lcd.print(buffer); // print the string on the display
76 |
77 | spb1.showProgressPct(b1);
78 | spb2.showProgressPct(b2);
79 |
80 | b1++;
81 | b2 += 2;
82 | if (b1 > 100)
83 | b1 = 0;
84 | if (b2 > 100)
85 | b2 = 0;
86 |
87 | delay(50);
88 | }
89 |
90 |
--------------------------------------------------------------------------------
/examples/TwoPB_i2c/TwoPB_i2c.ino:
--------------------------------------------------------------------------------
1 | /**
2 | * @file TwoPB_i2c.ino
3 | * @ingroup examples
4 | * @brief Shows 2 progress bars on i2c connected LCD
5 | *
6 | * This example shows how to display a two horizontal smooth progress bar
7 | * on a character LCD display connected through i2c expander board
8 | */
9 |
10 | // Wiring
11 | // For serial (I2C) wiring follow the recommendations for your adapter board
12 | // or for the most common boards you can find a guide at https://create.arduino.cc/projecthub/arduino_uno_guy/i2c-liquid-crystal-displays-5b806c
13 | // The most typical serial wiring for the would be:
14 | //
15 | // For Arduino Uno, Nano, Micro:
16 | // Connect SCL to analog 5
17 | // Connect SDA to analog 4
18 | // Connect VDD to 5V DC
19 | // Connect GROUND to common ground
20 | //
21 | // For ESP8266 (NodeMCU):
22 | // Connect SCL to D1 (GPIO5)
23 | // Connect SDA to D2 (GPIO4)
24 | // Connect VDD to 5V DC (3.3V) DC
25 | // Connect GROUND to common ground
26 | // !!! ESP8266 is 3.3V device, while most of the widely available character LCD displays (1602, 2004) are usually for 5V (although such 3.3V displays do exist)
27 | // If your LCD is 3.3V you can connect the signals directly and 3.3V to VDD
28 | // but if your LCD is 5V, for reliable operation you will have to power it by 5V and also consider using level shifter for the signals
29 |
30 |
31 | //First include the Liquid Crystal library or
32 | #include
33 |
34 | // than include the Smooth progress bars library
35 | #include
36 |
37 | // SmoothProgress supports different styles, each stored in separate .h file that should be included next
38 | // Let's include the style for horizontal progress bar as in a square frame with 1 pixel margin
39 | #include
40 | #include
41 |
42 | // Define the lcd object for the display as usual
43 | LiquidCrystal_I2C lcd(0x27, 16, 2); // set the LCD address to 0x27 for a 16 chars and 2 line display
44 |
45 | // The library supports multiple progress bars (up to 4) on a single display, different styles and multiple displays
46 | // but the hardware limitation of these displays dictates that all progress bars on a single display have to share the same style
47 | // Create the association between the lcd display and the progress bar style
48 | // as a bar_display (LCD) object dispA to be used when creating the smooth progress bar object
49 | LCD dispA(lcd, barStyle1);
50 |
51 | // Create the objects representing the smooth progress bar
52 | SmoothProgressBar spb1(dispA, 10, 0, 0, 0); // progress bar 10 characters wide, at 0-th row, 0-th column, as progress bar 0
53 | SmoothProgressBar spb2(dispA, 12, 0, 1, 1); // progress bar 12 characters wide, at 1-th row, 0-th column, as progress bar 1
54 |
55 | void setup()
56 | {
57 | // do the usual lcd initialization for the used liquid crystal library
58 | lcd.init();
59 |
60 | lcd.backlight(); // enable backlight for the LCD module
61 | lcd.print("Smooth");
62 | lcd.setCursor(0, 1);
63 | lcd.print("Progress");
64 |
65 | // also initialize the bar_display object (loads the style)
66 | dispA.begin();
67 |
68 | delay(2000);
69 | lcd.clear();
70 | }
71 |
72 | int b1 = 0, b2 = 0;
73 | char buffer[16];
74 |
75 | void loop()
76 | {
77 | sprintf(buffer, "%3d%%", b1);
78 | lcd.setCursor(12, 0); // move cursor to top left
79 | lcd.print(buffer); // print the string on the display
80 | sprintf(buffer, "%3d%%", b2);
81 | lcd.setCursor(12, 1); // move cursor to top left
82 | lcd.print(buffer); // print the string on the display
83 |
84 | spb1.showProgressPct(b1);
85 | spb2.showProgressPct(b2);
86 |
87 | b1++;
88 | b2 += 2;
89 | if (b1 > 100)
90 | b1 = 0;
91 | if (b2 > 100)
92 | {
93 | b2 = 0;
94 | if(&dispA.getStyle() == &barStyle1)
95 | dispA.setStyle(barStyle2);
96 | else
97 | dispA.setStyle(barStyle1);
98 | }
99 |
100 | delay(50);
101 | }
102 |
103 |
--------------------------------------------------------------------------------
/docs/html/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | SmoothProgress: Main Page
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
SmoothProgress 1.0.0
30 |
31 |
Displays smooth progress bars on a character based LCD displays for Arduino
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
44 |
45 |
46 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
64 |
65 |
66 |
71 |
72 |
73 |
77 |
78 |
79 |
80 |
81 |
84 |
85 |
86 |
87 |
SmoothProgress Documentation
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
Generated by 1.9.4
96 |
97 |
98 |
99 |
100 |
--------------------------------------------------------------------------------
/examples/StylesInFlash/StylesInFlash.ino:
--------------------------------------------------------------------------------
1 | /**
2 | * @file StylesInFlash.ino
3 | * @ingroup examples
4 | * @brief Demonstrates how to save memory by storing the styles in the flash memory
5 | *
6 | * This example shows how to save memory by storing the styles in the flash memory
7 | * and use the styles stored in flash memory (instead of SRAM)
8 | */
9 |
10 | // Wiring
11 | // For serial (I2C) wiring follow the recommendations for your adapter board
12 | // or for the most common boards you can find a guide at https://create.arduino.cc/projecthub/arduino_uno_guy/i2c-liquid-crystal-displays-5b806c
13 |
14 | //First include the Liquid Crystal library
15 | #include
16 |
17 | // than include the Smooth progress bars library
18 | #include
19 |
20 | // SmoothProgress supports different styles, each stored in separate .h file that should be included next
21 | // Let's include the style for horizontal progress bar as in a rounded frame with 1 pixel margin
22 | // To use the program (flash) memory (A.K.A. PROGMEM) for storing the masks that define the style of the progress bar (and save some RAM memory)
23 | // insert #define BAR_STYLE_<#>_IN_PROGMEM before including the corresponding header with the style
24 | // do not forget to use the wrapper when passing the style structure to barstyle constructor
25 | #define BAR_STYLES_IN_PROGMEM
26 | #include
27 |
28 | // Define the lcd object for the display as usual
29 | LiquidCrystal_I2C lcd(0x27, 16, 2); // set the LCD address to 0x27 for a 16 chars and 2 line display
30 |
31 | // The library supports multiple progress bars (up to 4) on a single display, different styles and multiple displays
32 | // but the hardware limitation of these displays dictates that all progress bars on a single display have to share the same style
33 | // Create the association between the lcd display and the progress bar style
34 | // as a bar_display (LCD) object dispA to be used when creating the smooth progress bar object
35 | // If the style is stored in PROGMEM use the inPROGMEM wrapper !!!
36 | LCD dispA(lcd, inPROGMEM(barStyle4));
37 |
38 | // Create the object representing the smooth progress bar
39 | SmoothProgressBar spb1(dispA, 10, 0, 0, 0); // progress bar 10 characters wide, at 0-th row, 0-th column, as progress bar 0
40 | SmoothProgressBar spb2(dispA, 12, 0, 1, 1); // progress bar 12 characters wide, at 1-th row, 0-th column, as progress bar 1
41 |
42 | // you can define your own style
43 | static const PROGMEM struct barstyle
44 | // or use
45 | // static const struct barstyle
46 | // to store it in SRAM
47 | myBarStyle = {
48 | {
49 | {B00000, B00000, B00001, B00010, B00001, B00000, B00000, B00000}, // leftANDmask
50 | {B00001, B00010, B00100, B01000, B01000, B00100, B00010, B00001}}, // leftORmask
51 | {
52 | {B00000, B00000, B10000, B01000, B10000, B00000, B00000, B00000}, // rightANDmask
53 | {B10000, B01000, B00100, B00010, B00010, B00100, B01000, B10000}}, // rightORmask
54 | {
55 | {B00000, B01010, B10101, B01010, B10101, B01010, B10101, B00000}, // middleANDmask
56 | {B10101, B00000, B00000, B00000, B00000, B00000, B00000, B10101}}, // middleORmask
57 | 3, // left offset,
58 | 3, // right offset
59 | 0 // orientation = horizontal
60 | };
61 |
62 | void setup()
63 | {
64 | // do the usual lcd initialization for the used liquid crystal library
65 | lcd.init();
66 |
67 | lcd.backlight();
68 | lcd.print("Smooth progress bar");
69 |
70 | // also initialize the bar_display object (loads the style)
71 | dispA.begin();
72 |
73 | delay(2000);
74 | lcd.clear();
75 | }
76 |
77 | int b1 = 0, b2 = 0;
78 | char buffer[16];
79 |
80 | void loop()
81 | {
82 | sprintf(buffer, "%3d%%", b1);
83 | lcd.setCursor(12, 0); // move cursor to top left
84 | lcd.print(buffer); // print the string on the display
85 | sprintf(buffer, "%3d%%", b2);
86 | lcd.setCursor(12, 1); // move cursor to top left
87 | lcd.print(buffer); // print the string on the display
88 |
89 | spb1.showProgressPct(b1);
90 | spb2.showProgressPct(b2);
91 |
92 | b1++;
93 | b2+=2;
94 | if (b1 > 100)
95 | {
96 | b1 = 0;
97 | // you can change the style while the progress bars are running
98 | if (&dispA.getStyle() == &barStyle4)
99 | dispA.setStyle(inPROGMEM(myBarStyle));
100 | else
101 | dispA.setStyle(inPROGMEM(barStyle4));
102 | }
103 | if (b2 > 100)
104 | b2 = 0;
105 |
106 | delay(50);
107 | }
108 |
109 |
--------------------------------------------------------------------------------
/examples/BatteryGauge/BatteryGauge.ino:
--------------------------------------------------------------------------------
1 | /**
2 | * @file BatteryGauge.ino
3 | * @ingroup examples
4 | * @brief Four horizontal / vertical battery gauges example using smooth progress bars
5 | *
6 | * This example shows how to display a four horizontal and vertical battery gauges
7 | * on a character LCD display using the SmoothProgress library.
8 | */
9 |
10 | // Wiring : see the comments in the basic.ino example
11 |
12 | //First include the Liquid Crystal library or
13 | #include
14 |
15 | // than include the Smooth progress bars library
16 | #include
17 |
18 | // SmoothProgress supports different styles, each stored in separate .h file that should be included next
19 | // Include the style for basic horizontal battery bar BarStyleBat.h
20 | // To use the flash (program) memory (a.k.a. PROGMEM) for storing the masks that define the style of the progress bar
21 | // (and save some RAM memory) insert #define BAR_STYLE_<#>_IN_PROGMEM before including the corresponding header with the style
22 | // Do not forget to use the wrapper when passing the style structure to barstyle (LCD) constructor
23 | #define BAR_STYLES_IN_PROGMEM
24 | #include
25 | #include
26 |
27 | // Define the lcd object for the display as usual
28 | LiquidCrystal_I2C lcd(0x27, 20, 4); // set the LCD address to 0x27 for a 20 chars and 4 line display
29 |
30 | // The library supports multiple progress bars (up to 4) on a single display, different styles and multiple displays
31 | // but the hardware limitation of these displays dictates that all progress bars on a single display have to share the same style
32 | // Create the association between the LCD display and the progress bar style
33 | // as a bar_display (LCD) object dispA to be used when creating the smooth progress bar object
34 | // If the style is stored in flash (program) memory you have to use the inPROGMEM wrapper !!!
35 | LCD dispA(lcd, inPROGMEM(barStyleBat));
36 |
37 | // Create the object representing the battery charge
38 | SmoothProgressBar bat[2][4] = {
39 | {
40 | SmoothProgressBar(dispA, 6, 0, 0, 0),
41 | SmoothProgressBar(dispA, 6, 0, 2, 1),
42 | SmoothProgressBar(dispA, 6, 14, 0, 2),
43 | SmoothProgressBar(dispA, 6, 14, 2, 3)
44 | },
45 | {
46 | SmoothProgressBar(dispA, 2, 2, 2, 0),
47 | SmoothProgressBar(dispA, 2, 7, 2, 1),
48 | SmoothProgressBar(dispA, 2, 12, 2, 2),
49 | SmoothProgressBar(dispA, 2, 17, 2, 3)
50 | } };
51 |
52 |
53 | void setup()
54 | {
55 | lcd.init(); // do the usual lcd initialization for the used liquid crystal library
56 | lcd.backlight(); // enable backlight for the LCD module
57 | lcd.print("4 Batteries");
58 |
59 | dispA.begin(); // also initialize the bar_display object (loads the style)
60 |
61 | delay(2000);
62 | lcd.clear();
63 | }
64 |
65 | char bufferp[16], bufferv[16];
66 | int val[4];
67 | int style = 0;
68 | unsigned long lastTimeChanged = 0;
69 | const unsigned long ChangeEvery = 5000;
70 |
71 | void loop()
72 | {
73 | // simulate some values
74 | for (int j = 10; j <= 100; j++)
75 | {
76 | for (int i = 0; i < 4; i++)
77 | {
78 | val[i] = min(max(j + i * 10, 0), 100);
79 | bat[style][i].showProgressPct(val[i]);
80 | sprintf(bufferp, "%3d%%", val[i]);
81 | dtostrf(3.2 + val[i] / 100.0, 4, 2, bufferv);
82 | if (style==0)
83 | {
84 | lcd.setCursor(6+(i/2)*5-i/2, (i % 2) * 2);
85 | lcd.print(bufferp);
86 | lcd.setCursor(1 + (i / 2) * 14, (i % 2) * 2 + 1);
87 | lcd.print(bufferv);
88 | lcd.print('v');
89 | }
90 | else
91 | {
92 | lcd.setCursor(i * 5 , 0);
93 | lcd.print(bufferp);
94 | lcd.setCursor(i * 5, 3);
95 | lcd.print(bufferv);
96 | }
97 | }
98 | delay(20);
99 | if (millis() - lastTimeChanged > ChangeEvery)
100 | {
101 | lastTimeChanged = millis();
102 | //change the style
103 | if (style == 0)
104 | {
105 | style = 1;
106 | dispA.setStyle(inPROGMEM(barStyleBatV));
107 | lcd.clear();
108 | }
109 | else
110 | {
111 | style = 0;
112 | dispA.setStyle(inPROGMEM(barStyleBat));
113 | lcd.clear();
114 | }
115 | }
116 | }
117 | delay(1000);
118 | }
119 |
120 |
--------------------------------------------------------------------------------
/docs/html/dynsections.js:
--------------------------------------------------------------------------------
1 | /*
2 | @licstart The following is the entire license notice for the JavaScript code in this file.
3 |
4 | The MIT License (MIT)
5 |
6 | Copyright (C) 1997-2020 by Dimitri van Heesch
7 |
8 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
9 | and associated documentation files (the "Software"), to deal in the Software without restriction,
10 | including without limitation the rights to use, copy, modify, merge, publish, distribute,
11 | sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
12 | furnished to do so, subject to the following conditions:
13 |
14 | The above copyright notice and this permission notice shall be included in all copies or
15 | substantial portions of the Software.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
18 | BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
20 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 |
23 | @licend The above is the entire license notice for the JavaScript code in this file
24 | */
25 | function toggleVisibility(linkObj)
26 | {
27 | var base = $(linkObj).attr('id');
28 | var summary = $('#'+base+'-summary');
29 | var content = $('#'+base+'-content');
30 | var trigger = $('#'+base+'-trigger');
31 | var src=$(trigger).attr('src');
32 | if (content.is(':visible')===true) {
33 | content.hide();
34 | summary.show();
35 | $(linkObj).addClass('closed').removeClass('opened');
36 | $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png');
37 | } else {
38 | content.show();
39 | summary.hide();
40 | $(linkObj).removeClass('closed').addClass('opened');
41 | $(trigger).attr('src',src.substring(0,src.length-10)+'open.png');
42 | }
43 | return false;
44 | }
45 |
46 | function updateStripes()
47 | {
48 | $('table.directory tr').
49 | removeClass('even').filter(':visible:even').addClass('even');
50 | }
51 |
52 | function toggleLevel(level)
53 | {
54 | $('table.directory tr').each(function() {
55 | var l = this.id.split('_').length-1;
56 | var i = $('#img'+this.id.substring(3));
57 | var a = $('#arr'+this.id.substring(3));
58 | if (l
25 | #include
26 | // Let's include the style for horizontal progress bar as in a square frame with 1 pixel margin
27 | #include
28 |
29 | // Define the lcd object for the display as usual
30 | LiquidCrystal_I2C lcd(0x27, 16, 2); // set the LCD address to 0x27 for a 16 chars and 2 line display
31 |
32 | // The library supports multiple progress bars (up to 4) on a single display, different styles and multiple displays
33 | // but the hardware limitation of these displays dictates that all progress bars on a single display have to share the same style
34 | // Create the association between the lcd display and the progress bar style
35 | // as a bar_display (LCD) object dispA to be used when creating the smooth progress bar object
36 | LCD dispA(lcd, barStyle4);
37 |
38 | // Create the object representing the smooth progress bar
39 | SmoothProgressBar spb(dispA, 10, 4, 0); // progress bar 10 characters wide, at 0-th row, 4-th column
40 |
41 | void setup()
42 | {
43 | lcd.init(); // do the usual lcd initialization for the used liquid crystal library
44 |
45 | lcd.backlight(); // enable backlight for the LCD module
46 | lcd.print("Use defined char");
47 |
48 | // also initialize the bar_display object (loads the style)
49 | dispA.begin();
50 |
51 | delay(2000);
52 | }
53 |
54 | //prepare the data for the user defined characters
55 | // animated moving arrows up
56 | byte image09[8] = { B01010, B10001, B00100, B01010, B10001, B00100, B01010, B10001 };
57 | byte image10[8] = { B10001, B00100, B01010, B10001, B00100, B01010, B10001, B00100 };
58 | byte image11[8] = { B00100, B01010, B10001, B00100, B01010, B10001, B00100, B01010 };
59 | // animated moving arrows down
60 | byte image25[8] = { B01010, B00100, B10001, B01010, B00100, B10001, B01010, B00100 };
61 | byte image26[8] = { B10001, B01010, B00100, B10001, B01010, B00100, B10001, B01010 };
62 | byte image27[8] = { B00100, B10001, B01010, B00100, B10001, B01010, B00100, B10001 };
63 |
64 | void loop()
65 | {
66 | lcd.clear();
67 |
68 | // create the 3 characters
69 | lcd.createChar(5, image09);
70 | lcd.createChar(6, image10);
71 | lcd.createChar(7, image11);
72 |
73 | for (int i = 0; i <= 100; i++)
74 | {
75 | lcd.setCursor(15, 0);
76 | lcd.write(byte(i/5 % 3 + 5)); // display one of the user defined characters
77 |
78 | lcd.setCursor(0, 0);
79 | lcd.print(i);
80 | lcd.print('%');
81 |
82 | spb.showProgressPct(i);
83 | delay(25);
84 | }
85 |
86 | delay(1000);
87 | lcd.clear();
88 |
89 | // change the user defined characters to something different
90 | lcd.createChar(5, image27);
91 | lcd.createChar(6, image26);
92 | lcd.createChar(7, image25);
93 |
94 | for (int i = spb.size(); i >=0; i--)
95 | {
96 | lcd.setCursor(15, 0);
97 | lcd.write(byte(i / 2 % 3 + 5)); // display one of the user defined characters
98 |
99 | lcd.setCursor(0, 0);
100 | lcd.print(i);
101 | lcd.print(' ');
102 |
103 | spb.showProgress(i);
104 | delay(100);
105 | }
106 | delay(500);
107 | }
108 |
109 |
--------------------------------------------------------------------------------
/docs/html/classin_p_r_o_g_m_e_m-members.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | SmoothProgress: Member List
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
SmoothProgress 1.0.0
30 |
31 |
Displays smooth progress bars on a character based LCD displays for Arduino
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
44 |
45 |
46 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
64 |
65 |
66 |
71 |
72 |
73 |
77 |
78 |
79 |
80 |
81 |
84 |
85 |
86 |
87 |
inPROGMEM Member List
88 |
89 |
90 |
91 |
This is the complete list of members for inPROGMEM, including all inherited members.
103 |
104 |
105 |
--------------------------------------------------------------------------------
/examples/BasicProgress/BasicProgress.ino:
--------------------------------------------------------------------------------
1 | /**
2 | * @file BasicProgress.ino
3 | * @ingroup examples
4 | * @brief Basic library usage example
5 | *
6 | * This example shows how to display a single horizontal smooth progress bar on a character LCD display.
7 | */
8 |
9 | // Wiring
10 | // For serial (I2C) wiring follow the recommendations for your adapter board
11 | // or for the most common boards you can find a guide at https://create.arduino.cc/projecthub/arduino_uno_guy/i2c-liquid-crystal-displays-5b806c
12 | //
13 | // For parallel (direct I/O control) you can find a guide at https://docs.arduino.cc/learn/electronics/lcd-displays
14 | // The most common wiring (also used here) is:
15 | // 1 - LCD gnd to Arduino GND
16 | // 2 - VCC (5v) to +5V
17 | // 3 - Vo Contrast Voltage (connect to wiper of 10K potentiometer which other contacts are connected to +5V and GND)
18 | // 4 - RS Register Select (rs) to D12
19 | // 5 - Read/Write to GND
20 | // 6 - Enable (en) to D11
21 | // 7 - Data 0 (db0) ----
22 | // 8 - Data 1 (db1) |-------- Not used in 4 bit mode
23 | // 9 - Data 2 (db2) |
24 | // 10 - Data 3 (db3) ----
25 | // 11 - Data 4 (db4) to D5
26 | // 12 - Data 5 (db5) to D4
27 | // 13 - Data 6 (db6) to D3
28 | // 14 - Data 7 (db7) to D2
29 | // 15 - Backlight Anode through 220Ohm resistor to +5v
30 | // 16 - Backlight Cathode to GND
31 |
32 | // !!! ESP8266 is 3.3V device, while most of the widely available character LCD displays (1602, 2004) are usually for 5V (although such 3.3V displays do exist)
33 | // If your LCD is 3.3V you can connect the signals directly and 3.3V to VDD
34 | // but if your LCD is 5V, for reliable operation you will have to power it by 5V and use a level shifter
35 |
36 | //First include the Liquid Crystal library or
37 | //#include
38 | #include
39 |
40 | // than include the Smooth progress bars library
41 | #include
42 |
43 | // SmoothProgress supports progress bars in different visual styles
44 | // Each style is stored in separate .h file that should be included next (you have to use at leas one)
45 | // Let's include the style for horizontal progress bar as a square frame with 1 pixel margin
46 | #include
47 |
48 | // Define the lcd object for the display as recommended for the used liquid crystal library
49 | const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
50 | LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
51 |
52 | // The library supports multiple progress bars (up to 4 on a single display), different styles and multiple displays
53 | // The hardware limitation of these displays implies that all progress bars on a single display have to share the same style
54 | // Next create the association between the lcd display object and the progress bar style
55 | // as a bar_display (LCD) object (dispA here) to be further used when creating
56 | // the smooth progress bar object and/or changing the style of the displayed progress bars
57 | LCD dispA(lcd, barStyle1);
58 |
59 | // Create the object representing the smooth progress bar to be shown on dispA (lcd)
60 | // defining its size and position on the display
61 | SmoothProgressBar spb(dispA, 10, 5, 0); // progress bar 10 characters wide, at 5-th column, 0-th row
62 |
63 | void setup()
64 | {
65 | // do the usual lcd initialization for the used liquid crystal library
66 | lcd.begin(16, 2);
67 |
68 | lcd.print("Smooth progress bar");
69 |
70 | // also initialize the bar_display object (loads the style)
71 | dispA.begin();
72 |
73 | delay(2000);
74 | }
75 |
76 | void loop()
77 | {
78 | lcd.clear();
79 |
80 | // you can show the progress bar calling showProgressPct and specifying the percentage [0-100] to be filled
81 | for (int i = 0; i <= 100; i++)
82 | {
83 | lcd.setCursor(0, 0); // move cursor to top left
84 | lcd.print(i); // print the string on the display
85 | lcd.print('%'); // print the string on the display
86 |
87 | spb.showProgressPct(i);
88 | delay(25);
89 | }
90 |
91 | delay(1000);
92 | lcd.clear();
93 |
94 | // or you can use showProgress method and specifying the number of columns to be filled
95 | // The length in pixel columns of the progress bar can be found by calling the size() method
96 |
97 | for (int i = spb.size(); i >=0; i--)
98 | {
99 | lcd.setCursor(0, 0); // move cursor to top left
100 | lcd.print(i); // print the number on the display
101 | lcd.print(' '); // print a character on the display (to overwrite)
102 |
103 | spb.showProgress(i);
104 | delay(100);
105 | }
106 | delay(1000);
107 |
108 | lcd.clear();
109 | // you can move the progress bar on another position on the display
110 | // and/or change its size
111 | if (spb.row() == 0)
112 | {
113 | spb.setPosition(spb.col() - 5, 1);
114 | spb.setLength(spb.getLength() + 5);
115 | }
116 | else
117 | {
118 | spb.setPosition(spb.col() + 5, 0);
119 | spb.setLength(spb.getLength() - 5);
120 | }
121 |
122 | }
123 |
124 |
--------------------------------------------------------------------------------
/docs/html/classes.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | SmoothProgress: Class Index
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
SmoothProgress 1.0.0
30 |
31 |
Displays smooth progress bars on a character based LCD displays for Arduino
118 |
119 |
120 |
--------------------------------------------------------------------------------
/docs/html/menu.js:
--------------------------------------------------------------------------------
1 | /*
2 | @licstart The following is the entire license notice for the JavaScript code in this file.
3 |
4 | The MIT License (MIT)
5 |
6 | Copyright (C) 1997-2020 by Dimitri van Heesch
7 |
8 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
9 | and associated documentation files (the "Software"), to deal in the Software without restriction,
10 | including without limitation the rights to use, copy, modify, merge, publish, distribute,
11 | sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
12 | furnished to do so, subject to the following conditions:
13 |
14 | The above copyright notice and this permission notice shall be included in all copies or
15 | substantial portions of the Software.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
18 | BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
20 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 |
23 | @licend The above is the entire license notice for the JavaScript code in this file
24 | */
25 | function initMenu(relPath,searchEnabled,serverSide,searchPage,search) {
26 | function makeTree(data,relPath) {
27 | var result='';
28 | if ('children' in data) {
29 | result+='
';
30 | for (var i in data.children) {
31 | var url;
32 | var link;
33 | link = data.children[i].url;
34 | if (link.substring(0,1)=='^') {
35 | url = link.substring(1);
36 | } else {
37 | url = relPath+link;
38 | }
39 | result+='