19 |
20 | MicroViewWidget *widget[2]; // declaring an array of 4 MicroViewWidget
21 |
22 | void setup() {
23 | uView.begin(); // init and start MicroView
24 | widget[0] = new MicroViewSlider(0,0,0,255); // declare widget0 as a Slider at x=0, y=0, min=0, max=100
25 | widget[1] = new MicroViewGauge(32,24,0,255,WIDGETSTYLE0); // declare widget0 as a Slider at x=0, y=10, min=0, max=150
26 | uView.clear(PAGE); // erase the memory buffer, when next uView.display() is called, the OLED will be cleared.
27 | }
28 |
29 | void loop() {
30 |
31 | widget[0]->reDraw();
32 | for (int i=0;i<=255;i++) {
33 | widget[0]->setValue(i); // set value i to widget0
34 | uView.display();
35 | }
36 |
37 | delay(500);
38 | uView.clear(PAGE);
39 |
40 | widget[1]->reDraw();
41 | for (int i=0;i<=255;i++) {
42 | widget[1]->setValue(i); // set value i to widget0
43 | uView.display();
44 | }
45 |
46 | delay(500);
47 | uView.clear(PAGE);
48 | }
49 |
--------------------------------------------------------------------------------
/Libraries/Arduino/extras/OLED-Datasheet_SAS1-02007-A UG-6448HLBEG03 (WiseChip).pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sparkfun/MicroView/ee55a615dc9fecf20cafac548a2f13eff331b269/Libraries/Arduino/extras/OLED-Datasheet_SAS1-02007-A UG-6448HLBEG03 (WiseChip).pdf
--------------------------------------------------------------------------------
/Libraries/Arduino/extras/README.md:
--------------------------------------------------------------------------------
1 | NOTE: THIS DOCUMENTATION IS DEPRECATED.
2 | =======================================
3 | MicroView
4 | ---------
5 | # MicroView Arduino Library
6 | Developed by [Geek Ammo Pty Ltd](http://www.geekammo.com) based on Arduino and other Open Source libraries.
7 |
8 | ## Description
9 | Arduino library for MicroView.
10 |
11 | ## Required Libraries
12 | 1. [Time.h](http://www.pjrc.com/teensy/td_libs_Time.html) NOTE: Only required when using clock/time functions. For example the MicroViewDemo in the example folder.
13 |
14 | ## Installation
15 | 1. Change directory to Arduino's main directory
16 | 2. cd libraries
17 | 3. mkdir MicroView
18 | 4. cd MicroView
19 | 5. git clone https://github.com/geekammo/MicroView-Arduino-Library.git .
20 | 6. Start Arduino IDE.
21 | 7. MicroView example is located at, File--->Example--->MicroView--->MicroViewDemo
22 |
23 | ### Example 1 - Hello World!
24 |
25 | #include <MicroView.h>
26 |
27 | void setup() {
28 | uView.begin();
29 | }
30 |
31 | void loop() {
32 | uView.print("HelloWorld");
33 | uView.display(); // display current page buffer
34 | }
35 |
36 |
37 | ### Example 2 - Basic Drawing
38 |
39 | #include <MicroView.h>
40 |
41 | void setup() {
42 | uView.begin();
43 | uView.clear(PAGE); // clear the page buffer
44 | }
45 |
46 | void loop() {
47 | uView.line(0,0,64,48);
48 | uView.circle(32,24,10);
49 | uView.rect(10,10,20,20);
50 | uView.pixel(50,5);
51 | uView.setCursor(0,40);
52 | uView.print(" MicroView");
53 | uView.display(); // display current page buffer
54 | }
55 |
56 |
57 | ### Example 3 - Widgets
58 |
59 | #include <MicroView.h>
60 |
61 | MicroViewWidget *widget,*widget2;
62 |
63 | void setup() {
64 | uView.begin();
65 | uView.clear(PAGE);
66 | widget= new MicroViewGauge(32,30,0,100); // draw Gauge widget at x=32,y=30,min=0, max=100
67 | widget2= new MicroViewSlider(0,0,0,100); // draw Slider widget at x=0,y=0,min=0, max=100
68 | }
69 |
70 | void loop() {
71 | for(int i=0; i<=100;i++) {
72 | widget->setValue(i); // give a value to widget
73 | widget2->setValue(i);
74 | uView.display(); // display current page buffer
75 | }
76 | }
77 |
78 |
79 | ### Example 4 - Communication
80 |
81 | #include <MicroView.h>
82 |
83 | void setup() {
84 | uView.begin();
85 | uView.clear(PAGE);
86 | Serial.begin(115200); // user decide the baud rate
87 | }
88 |
89 | void loop() {
90 | uView.checkComm();
91 | }
92 |
93 |
94 | ## History
95 | **v1.22b: 4th October 2014 by Scott Allen and Ben Lewis**
96 | * replaced circleFill() with a faster algorithm, better looking circle - Ben Lewis
97 | * replaced sprintf with dedicated code, reduced program size - Scott Allen
98 | * added getValLen method for widgets to return length of current value - Scott Allen
99 | * initialised widget with minimum value instead of 0 - Scott Allen
100 | * added getValLen and getMaxValLen keywords
101 | * modified MicroViewDemo example to use getValLen method - Scott Allen
102 |
103 | **v1.21b: 22nd September 2014 by Esmit Pérez and Scott Allen**
104 | * re-factored code if/else with switch - Esmit Pérez
105 | * simplified draw() to remove redundant code - Esmit Pérez
106 | * added WIDGETNOVALUE to widgets - Scott
107 | * fixed compiler warning - Scott
108 | * improved gauge minor ticks - Scott
109 | * added destructor for MicroViewWidget base class - Scott
110 |
111 | **v1.20b: 27th August 2014 by Scott Allen, Emil Ong**
112 | * added Flashing Heart Example - JP
113 | * added getScreenBuffer() for access to screen RAM - Scott
114 | * added keywords for existing functions - Scott
115 | * fixed circleFill() - Emil
116 |
117 | **v1.19b: 19th August 2014 by Scott Allen**
118 | * added uView.scrollLeft() function
119 | * simplified Silder Widget drawFace() function
120 | * added full signed 16 bit ranges for widgets
121 | * improved drawing for minor and major ticks
122 |
123 | **v1.18b: 5th August 2014 by Scott Allen**
124 | * fixed compiler warning in MicroViewSlider
125 | * changed vertical slider direction.
126 |
127 | **v1.17b: 4th August 2014 by JP Liew**
128 | * added reDraw() for MicroViewWidget class
129 | * removed Serial.begin() from uView.begin() so that user can have control
130 | * added MicroViewWidgetRedraw example
131 |
132 | **v1.16b: 3rd August 2014 by czetie**
133 | * added vertical slider widget
134 |
135 | **v1.15b: 3rd August 2014 by Scott Allen**
136 | * improved lots of low level routines, Fast SPI
137 | * fixed some compilation warnings
138 | * reduced overdriving display inputs
139 | * added uView.end() to power off the display
140 | * improved speed of display() and clear() functions
141 | * fixed positionning of "3" on clock face
142 |
143 | **v1.14b: 26th July 2014 by JP Liew**
144 | * added Learning Kit Circuit Sketch
145 |
146 | **v1.13b: 13th June 2014 by JP Liew**
147 | * added Sine Wave Example
148 | * inserted license to example code
149 |
150 | **v1.12b: 11th June 2014 by JP Liew**
151 | * added comments for SparkFun Logo
152 | * added Rotating Cube example by Jim Lindblom @ SparkFun Electronics
153 | * changed git clone instruction to use https
154 |
155 | **v1.11b: 9th June 2014 by JP Liew**
156 | * added simple tutorials for production sketch
157 | * modified OLED RESET pin to 7
158 | * added SparkFun Logo
159 |
160 | **v1.10b: 22th April 2014 by JP Liew**
161 | * changed SS, RESET, DC pins to use weak internal pull-up resistors
162 |
163 | **v1.09b: 17th April 2014 by JP Liew**
164 | * changed verticalFlip() to flipVertical() and horizontalFlip() to flipHorizontal() for consistency
165 | * added debug messages for doCmd()
166 |
167 | **v1.08b: 18th February 2014 by JP Liew**
168 | * added verticalFlip(), horizontalFlip()
169 |
170 | **v1.07b: 15th February 2014 by JP Liew**
171 | * changed function name stopScroll to scrollStop for consistency
172 | * added contrast function
173 | * added invert function
174 | * added KEYWORD to keywords.txt
175 | * added checkComm() function to communicate with host PC
176 |
177 | **v1.06b: 9th February 2014 by JP Liew**
178 | * fixed Slider negative value not working
179 | * added round Gauge widget
180 | * changed Example 3 to show round Gauge
181 |
182 | **v1.05b: 6th February 2014 by JP Liew**
183 | * changed MICROVIEW class name to MicroView
184 | * created MicroViewWidget class
185 | * added routines to draw widget
186 | * added slider widget
187 | * merged MicroViewWidget into MicroView
188 | * merged SPI.h into MicroView
189 |
190 | **v1.04b: 3rd February 2014 by JP Liew**
191 | * declared permanent uView variable.
192 | * cleaned code and added some remarks.
193 | * added drawing functions that make use of default color and draw mode.
194 | * added example in README.md
195 |
196 | **v1.03b: 1st February 2014 by JP Liew**
197 | * added 7 segment number only font.
198 |
199 | **v1.02b: 31th January 2014 by JP Liew**
200 | * added sprite animation demo.
201 |
202 | **v1.01b: 30th January 2014 by JP Liew**
203 | * fixed font draw XOR mode bug.
204 | * added analog clock demo.
205 |
206 | **v1.00b: 30th January 2014 by JP Liew**
207 | * Initial commit. Beta with minor bugs.
208 |
209 | ## License
210 | MicroView Arduino Library
211 | Copyright (C) 2014 GeekAmmo
212 |
213 | This program is free software: you can redistribute it and/or modify
214 | it under the terms of the GNU General Public License as published by
215 | the Free Software Foundation, either version 3 of the License, or
216 | (at your option) any later version.
217 |
218 | This program is distributed in the hope that it will be useful,
219 | but WITHOUT ANY WARRANTY; without even the implied warranty of
220 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
221 | GNU General Public License for more details.
222 |
223 | You should have received a copy of the GNU General Public License
224 | along with this program. If not, see .
225 |
226 |
--------------------------------------------------------------------------------
/Libraries/Arduino/keywords.txt:
--------------------------------------------------------------------------------
1 | #######################################
2 | # Syntax Coloring Map For MicroView
3 | #######################################
4 |
5 | #######################################
6 | # Datatypes (KEYWORD1)
7 | #######################################
8 |
9 | MICROVIEW KEYWORD1
10 | uView KEYWORD1
11 | MicroViewWidget KEYWORD1
12 | MicroViewSlider KEYWORD1
13 | MicroViewGauge KEYWORD1
14 |
15 | #######################################
16 | # Methods and Functions (KEYWORD2)
17 | #######################################
18 |
19 | begin KEYWORD2
20 | clear KEYWORD2
21 | invert KEYWORD2
22 | contrast KEYWORD2
23 | display KEYWORD2
24 | setCursor KEYWORD2
25 | pixel KEYWORD2
26 | line KEYWORD2
27 | lineH KEYWORD2
28 | lineV KEYWORD2
29 | rect KEYWORD2
30 | rectFill KEYWORD2
31 | circle KEYWORD2
32 | circleFill KEYWORD2
33 | drawChar KEYWORD2
34 | getLCDWidth KEYWORD2
35 | getLCDHeight KEYWORD2
36 | setColor KEYWORD2
37 | setDrawMode KEYWORD2
38 | getFontWidth KEYWORD2
39 | getFontHeight KEYWORD2
40 | getTotalFonts KEYWORD2
41 | getFontType KEYWORD2
42 | setFontType KEYWORD2
43 | getFontStartChar KEYWORD2
44 | getFontTotalChar KEYWORD2
45 | scrollRight KEYWORD2
46 | scrollLeft KEYWORD2
47 | scrollVertRight KEYWORD2
48 | scrollVertLeft KEYWORD2
49 | scrollStop KEYWORD2
50 | flipVertical KEYWORD2
51 | flipHorizontal KEYWORD2
52 | setColumnAddress KEYWORD2
53 | setPageAddress KEYWORD2
54 | data KEYWORD2
55 | getScreenBuffer KEYWORD2
56 |
57 | getX KEYWORD2
58 | getY KEYWORD2
59 | setX KEYWORD2
60 | setY KEYWORD2
61 | getMinValue KEYWORD2
62 | getMaxValue KEYWORD2
63 | setMaxValue KEYWORD2
64 | setMinValue KEYWORD2
65 | setValue KEYWORD2
66 | getValLen KEYWORD2
67 | getMaxValLen KEYWORD2
68 | draw KEYWORD2
69 | reDraw KEYWORD2
70 | drawFace KEYWORD2
71 | drawNumValue KEYWORD2
72 | checkComm KEYWORD2
73 |
74 | #######################################
75 | # Constants (LITERAL1)
76 | #######################################
77 |
78 | BLACK LITERAL1
79 | WHITE LITERAL1
80 | NORM LITERAL1
81 | XOR LITERAL1
82 | PAGE LITERAL1
83 | ALL LITERAL1
84 | WIDGETSTYLE0 LITERAL1
85 | WIDGETSTYLE1 LITERAL1
86 | WIDGETSTYLE2 LITERAL1
87 | WIDGETSTYLE3 LITERAL1
88 | WIDGETNOVALUE LITERAL1
89 |
90 |
--------------------------------------------------------------------------------
/Libraries/Arduino/library.properties:
--------------------------------------------------------------------------------
1 | name=SparkFun MicroView
2 | version=1.0.1
3 | author=SparkFun Electronics
4 | maintainer=SparkFun Electronics
5 | sentence=The MicroView is a chip-sized Arduino with a built-in OLED, available from SparkFun Electronics
6 | paragraph=The MicroView is a chip-sized Arduino with a built-in OLED, available from SparkFun Electronics.
7 | category=Display
8 | url=https://github.com/sparkfun/SparkFun_MicroView_Arduino_Library
9 | architectures=*
10 |
--------------------------------------------------------------------------------
/Libraries/Arduino/src/MicroView.h:
--------------------------------------------------------------------------------
1 | /*
2 | MicroView Arduino Library
3 | Copyright (C) 2014 GeekAmmo
4 |
5 | This program is free software: you can redistribute it and/or modify
6 | it under the terms of the GNU General Public License as published by
7 | the Free Software Foundation, either version 3 of the License, or
8 | (at your option) any later version.
9 |
10 | This program is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | GNU General Public License for more details.
14 |
15 | You should have received a copy of the GNU General Public License
16 | along with this program. If not, see .
17 | */
18 | #ifndef MICROVIEW_H
19 | #define MICROVIEW_H
20 |
21 | #include
22 | #include
23 | #include
24 |
25 | #define swap(a, b) { uint8_t t = a; a = b; b = t; }
26 |
27 | #define OLEDPWR 4 // 3.3V regulator enable
28 |
29 | // Port and bit mappings for DC, RESET, SS
30 | // ** These are CPU dependent **
31 | #define DCPORT PORTB
32 | #define DCDDR DDRB
33 | #define DCBIT 0
34 |
35 | #define RESETPORT PORTD
36 | #define RESETDDR DDRD
37 | #define RESETBIT 7
38 |
39 | #define SSPORT PORTB
40 | #define SSDDR DDRB
41 | #define SSBIT 2
42 |
43 | // Macros to quickly set DC, RESET, SS
44 | // A HIGH sets the signal to input mode with the internal pullup enabled
45 | #define DCHIGH ((DCPORT |= _BV(DCBIT)), (DCDDR &= ~_BV(DCBIT)))
46 | #define DCLOW ((DCPORT &= ~_BV(DCBIT)), (DCDDR |= _BV(DCBIT)))
47 |
48 | #define RESETHIGH ((RESETPORT |= _BV(RESETBIT)), (RESETDDR &= ~_BV(RESETBIT)))
49 | #define RESETLOW ((RESETPORT &= ~_BV(RESETBIT)), (RESETDDR |= _BV(RESETBIT)))
50 |
51 | #define SSHIGH ((SSPORT |= _BV(SSBIT)), (SSDDR &= ~_BV(SSBIT)))
52 | #define SSLOW ((SSPORT &= ~_BV(SSBIT)), (SSDDR |= _BV(SSBIT)))
53 |
54 | // SCK, MOSI already defined by original pins_arduino.h
55 | //#define SCK 13
56 | //#define MOSI 11
57 |
58 | #define BLACK 0
59 | #define WHITE 1
60 |
61 | #define LCDWIDTH 64
62 | #define LCDHEIGHT 48
63 | #define LCDPAGES (LCDHEIGHT / 8)
64 | #define LCDCOLUMNOFFSET 32 // Visible start column within SSD1306 controller memory
65 |
66 | #define LCDTOTALWIDTH 128 // Full width of SSD1306 controller memory
67 | #define LCDTOTALHEIGHT 64 // Full height of SSD1306 controller memory
68 | #define LCDTOTALPAGES (LCDTOTALHEIGHT / 8)
69 |
70 | #define FONTHEADERSIZE 6
71 |
72 | #define NORM 0
73 | #define XOR 1
74 |
75 | #define PAGE 0
76 | #define ALL 1
77 |
78 | #define WIDGETSTYLE0 0
79 | #define WIDGETSTYLE1 1
80 | // Added for Vertical slider styles
81 | #define WIDGETSTYLE2 2
82 | #define WIDGETSTYLE3 3
83 |
84 | // Flag to be added to widget style to indicate no numeric value display
85 | #define WIDGETNOVALUE 0x80
86 |
87 | #define SETCONTRAST 0x81
88 | #define DISPLAYALLONRESUME 0xA4
89 | #define DISPLAYALLON 0xA5
90 | #define NORMALDISPLAY 0xA6
91 | #define INVERTDISPLAY 0xA7
92 | #define DISPLAYOFF 0xAE
93 | #define DISPLAYON 0xAF
94 | #define SETDISPLAYOFFSET 0xD3
95 | #define SETCOMPINS 0xDA
96 | #define SETVCOMDESELECT 0xDB
97 | #define SETDISPLAYCLOCKDIV 0xD5
98 | #define SETPRECHARGE 0xD9
99 | #define SETMULTIPLEX 0xA8
100 | #define SETLOWCOLUMN 0x00
101 | #define SETHIGHCOLUMN 0x10
102 | #define SETPAGE 0xB0
103 | #define SETADDRESSMODE 0x20
104 | #define SETCOLUMNBOUNDS 0x21
105 | #define SETPAGEBOUNDS 0x22
106 | #define SETSTARTLINE 0x40
107 | #define MEMORYMODE 0x20
108 | #define COMSCANINC 0xC0
109 | #define COMSCANDEC 0xC8
110 | #define SEGREMAP 0xA0
111 | #define CHARGEPUMP 0x8D
112 | #define EXTERNALVCC 0x01
113 | #define SWITCHCAPVCC 0x02
114 |
115 | // Scroll
116 | #define ACTIVATESCROLL 0x2F
117 | #define DEACTIVATESCROLL 0x2E
118 | #define SETVERTICALSCROLLAREA 0xA3
119 | #define RIGHTHORIZONTALSCROLL 0x26
120 | #define LEFTHORIZONTALSCROLL 0x27
121 | #define VERTICALRIGHTHORIZONTALSCROLL 0x29
122 | #define VERTICALLEFTHORIZONTALSCROLL 0x2A
123 |
124 | typedef enum CMD {
125 | CMD_CLEAR, //0
126 | CMD_INVERT, //1
127 | CMD_CONTRAST, //2
128 | CMD_DISPLAY, //3
129 | CMD_SETCURSOR, //4
130 | CMD_PIXEL, //5
131 | CMD_LINE, //6
132 | CMD_LINEH, //7
133 | CMD_LINEV, //8
134 | CMD_RECT, //9
135 | CMD_RECTFILL, //10
136 | CMD_CIRCLE, //11
137 | CMD_CIRCLEFILL, //12
138 | CMD_DRAWCHAR, //13
139 | CMD_DRAWBITMAP, //14
140 | CMD_GETLCDWIDTH, //15
141 | CMD_GETLCDHEIGHT, //16
142 | CMD_SETCOLOR, //17
143 | CMD_SETDRAWMODE //18
144 | } commCommand_t;
145 |
146 | class MicroView : public Print{
147 | public:
148 | MicroView(void) {};
149 | void begin(void);
150 | void end(void);
151 |
152 | //#if ARDUINO >= 100
153 |
154 | virtual size_t write(uint8_t);
155 |
156 | //#else
157 | // virtual void write(uint8_t);
158 | //#endif
159 |
160 | // RAW LCD functions
161 | void command(uint8_t c);
162 | void command(uint8_t c1, uint8_t c2);
163 | void command(uint8_t c1, uint8_t c2, uint8_t c3);
164 | void data(uint8_t c);
165 | void setColumnAddress(uint8_t add);
166 | void setPageAddress(uint8_t add);
167 |
168 | // LCD Draw functions
169 | void clear(uint8_t mode);
170 | void clear(uint8_t mode, uint8_t c);
171 | void invert(boolean inv);
172 | void contrast(uint8_t contrast);
173 | void display(void);
174 | void setCursor(uint8_t x, uint8_t y);
175 | void pixel(uint8_t x, uint8_t y);
176 | void pixel(uint8_t x, uint8_t y, uint8_t color, uint8_t mode);
177 | void line(uint8_t x0, uint8_t y0, uint8_t x1, uint8_t y1);
178 | void line(uint8_t x0, uint8_t y0, uint8_t x1, uint8_t y1, uint8_t color, uint8_t mode);
179 | void lineH(uint8_t x, uint8_t y, uint8_t width);
180 | void lineH(uint8_t x, uint8_t y, uint8_t width, uint8_t color, uint8_t mode);
181 | void lineV(uint8_t x, uint8_t y, uint8_t height);
182 | void lineV(uint8_t x, uint8_t y, uint8_t height, uint8_t color, uint8_t mode);
183 | void rect(uint8_t x, uint8_t y, uint8_t width, uint8_t height);
184 | void rect(uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t color , uint8_t mode);
185 | void rectFill(uint8_t x, uint8_t y, uint8_t width, uint8_t height);
186 | void rectFill(uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t color , uint8_t mode);
187 | void circle(uint8_t x, uint8_t y, uint8_t radius);
188 | void circle(uint8_t x, uint8_t y, uint8_t radius, uint8_t color, uint8_t mode);
189 | void circleFill(uint8_t x0, uint8_t y0, uint8_t radius);
190 | void circleFill(uint8_t x0, uint8_t y0, uint8_t radius, uint8_t color, uint8_t mode);
191 | void drawChar(uint8_t x, uint8_t y, uint8_t c);
192 | void drawChar(uint8_t x, uint8_t y, uint8_t c, uint8_t color, uint8_t mode);
193 | void drawBitmap(void);
194 | uint8_t getLCDWidth(void);
195 | uint8_t getLCDHeight(void);
196 | void setColor(uint8_t color);
197 | void setDrawMode(uint8_t mode);
198 | uint8_t *getScreenBuffer(void);
199 |
200 | // Font functions
201 | uint8_t getFontWidth(void);
202 | uint8_t getFontHeight(void);
203 | uint8_t getTotalFonts(void);
204 | uint8_t getFontType(void);
205 | uint8_t setFontType(uint8_t type);
206 | uint8_t getFontStartChar(void);
207 | uint8_t getFontTotalChar(void);
208 |
209 | // LCD Rotate Scroll functions
210 | void scrollRight(uint8_t start, uint8_t stop);
211 | void scrollLeft(uint8_t start, uint8_t stop);
212 | void scrollVertRight(uint8_t start, uint8_t stop);
213 | void scrollVertLeft(uint8_t start, uint8_t stop);
214 | void scrollStop(void);
215 | void flipVertical(boolean flip);
216 | void flipHorizontal(boolean flip);
217 |
218 | // Communication
219 | void checkComm(void);
220 | void doCmd(uint8_t index);
221 |
222 | private:
223 | uint8_t foreColor,drawMode,fontWidth, fontHeight, fontType, fontStartChar, fontTotalChar, cursorX, cursorY;
224 | uint16_t fontMapWidth;
225 | //unsigned char *fontsPointer[TOTALFONTS];
226 | static const unsigned char *fontsPointer[];
227 |
228 | int readSerial(void);
229 | };
230 |
231 | class MicroViewWidget {
232 | public:
233 | MicroViewWidget(uint8_t newx, uint8_t newy, int16_t min, int16_t max);
234 | uint8_t getX();
235 | uint8_t getY();
236 | void setX(uint8_t newx);
237 | void setY(uint8_t newy);
238 | int16_t getMinValue();
239 | int16_t getMaxValue();
240 | int16_t getValue();
241 | void setMinValue(int16_t min);
242 | void setMaxValue(int16_t max);
243 | void setValue(int16_t val);
244 | uint8_t getValLen();
245 | uint8_t getMaxValLen();
246 | /** \brief Draw widget value overridden by child class. */
247 | virtual void draw(){};
248 | /** \brief Draw widget face overridden by child class. */
249 | virtual void drawFace(){};
250 | void reDraw();
251 | void drawNumValue(int16_t value);
252 | virtual ~MicroViewWidget(){};
253 | protected:
254 | uint8_t posX;
255 | uint8_t posY;
256 | int16_t minValue;
257 | int16_t maxValue;
258 | int16_t value;
259 | uint8_t valLen;
260 | uint8_t maxValLen;
261 | private:
262 | /** \brief Draw or erase the widget pointer. Overridden by child class. */
263 | virtual void drawPointer(){};
264 | void setMaxValLen();
265 | };
266 |
267 | class MicroViewSlider: public MicroViewWidget{
268 | public:
269 | MicroViewSlider(uint8_t newx, uint8_t newy, int16_t min, int16_t max);
270 | MicroViewSlider(uint8_t newx, uint8_t newy, int16_t min, int16_t max, uint8_t sty);
271 | void draw();
272 | void drawFace();
273 | private:
274 | void drawPointer();
275 | uint8_t style, totalTicks;
276 | bool noValDraw;
277 | int16_t prevValue;
278 | };
279 |
280 | class MicroViewGauge: public MicroViewWidget{
281 | public:
282 | MicroViewGauge(uint8_t newx, uint8_t newy, int16_t min, int16_t max);
283 | MicroViewGauge(uint8_t newx, uint8_t newy, int16_t min, int16_t max, uint8_t sty);
284 | void draw();
285 | void drawFace();
286 | private:
287 | void drawPointer();
288 | uint8_t style, radius;
289 | bool noValDraw;
290 | int16_t prevValue;
291 | };
292 |
293 | #define SPI_CLOCK_DIV4 0x00
294 | #define SPI_CLOCK_DIV16 0x01
295 | #define SPI_CLOCK_DIV64 0x02
296 | #define SPI_CLOCK_DIV128 0x03
297 | #define SPI_CLOCK_DIV2 0x04
298 | #define SPI_CLOCK_DIV8 0x05
299 | #define SPI_CLOCK_DIV32 0x06
300 | //#define SPI_CLOCK_DIV64 0x07
301 |
302 | #define SPI_MODE0 0x00
303 | #define SPI_MODE1 0x04
304 | #define SPI_MODE2 0x08
305 | #define SPI_MODE3 0x0C
306 |
307 | #define SPI_MODE_MASK 0x0C // CPOL = bit 3, CPHA = bit 2 on SPCR
308 | #define SPI_CLOCK_MASK 0x03 // SPR1 = bit 1, SPR0 = bit 0 on SPCR
309 | #define SPI_2XCLOCK_MASK 0x01 // SPI2X = bit 0 on SPSR
310 |
311 | class MVSPIClass {
312 | public:
313 | /** \brief Wait for SPI serial transfer complete. */
314 | inline static void wait();
315 |
316 | /** \brief Transfer data byte via SPI port. */
317 | inline static void transfer(byte _data);
318 |
319 | /** \brief Set up to begin a SPI packet transmit */
320 | static void packetBegin();
321 |
322 | /** \brief End a SPI packet transmit */
323 | static void packetEnd();
324 |
325 | // SPI Configuration methods
326 |
327 | inline static void attachInterrupt();
328 | inline static void detachInterrupt(); // Default
329 |
330 | static void begin(); // Default
331 | static void end();
332 |
333 | static void setBitOrder(uint8_t);
334 | static void setDataMode(uint8_t);
335 | static void setClockDivider(uint8_t);
336 | };
337 |
338 | extern MVSPIClass MVSPI;
339 |
340 | void MVSPIClass::wait() {
341 | while (!(SPSR & _BV(SPIF)))
342 | ;
343 | }
344 |
345 | void MVSPIClass::transfer(byte _data) {
346 | SPDR = _data;
347 | }
348 |
349 | void MVSPIClass::attachInterrupt() {
350 | SPCR |= _BV(SPIE);
351 | }
352 |
353 | void MVSPIClass::detachInterrupt() {
354 | SPCR &= ~_BV(SPIE);
355 | }
356 |
357 | extern MicroView uView;
358 |
359 | /** \brief Get the number of print characters for a 16 bit signed value. */
360 | uint8_t getInt16PrintLen(int16_t val);
361 |
362 | #endif
363 |
--------------------------------------------------------------------------------
/Libraries/Arduino/src/util/7segment.h:
--------------------------------------------------------------------------------
1 | /*
2 | MicroView Arduino Library
3 | Copyright (C) 2014 GeekAmmo
4 |
5 | This program is free software: you can redistribute it and/or modify
6 | it under the terms of the GNU General Public License as published by
7 | the Free Software Foundation, either version 3 of the License, or
8 | (at your option) any later version.
9 |
10 | This program is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | GNU General Public License for more details.
14 |
15 | You should have received a copy of the GNU General Public License
16 | along with this program. If not, see .
17 | */
18 | #ifndef FONT7SEGMENT_H
19 | #define FONT7SEGMENT_H
20 |
21 | #include
22 |
23 | static const unsigned char sevensegment [] PROGMEM = {
24 | // first row defines - FONTWIDTH, FONTHEIGHT, ASCII START CHAR, TOTAL CHARACTERS, FONT MAP WIDTH HIGH, FONT MAP WIDTH LOW (2,56 meaning 256)
25 | 10,16,46,12,1,20,
26 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
27 | 0x00, 0x00, 0x00, 0x00, 0x78, 0xFC, 0x02, 0x03, 0x03, 0x03, 0x03, 0x02, 0xFC, 0x78, 0x00, 0x00,
28 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x7E, 0x00, 0x00, 0x02, 0x83, 0x83, 0x83, 0x83, 0x02,
29 | 0xFC, 0x78, 0x00, 0x00, 0x02, 0x83, 0x83, 0x83, 0x83, 0x02, 0xFC, 0x78, 0x7E, 0xFF, 0x00, 0x80,
30 | 0x80, 0x80, 0x80, 0x00, 0xFF, 0x7E, 0x78, 0xFC, 0x02, 0x83, 0x83, 0x83, 0x83, 0x02, 0x00, 0x00,
31 | 0x78, 0xFC, 0x02, 0x83, 0x83, 0x83, 0x83, 0x02, 0x00, 0x00, 0x00, 0x02, 0x03, 0x03, 0x03, 0x03,
32 | 0x03, 0x02, 0xFC, 0x78, 0x78, 0xFC, 0x02, 0x83, 0x83, 0x83, 0x83, 0x02, 0xFC, 0x78, 0x78, 0xFC,
33 | 0x02, 0x83, 0x83, 0x83, 0x83, 0x02, 0xFC, 0x78, 0x00, 0x00, 0x00, 0x60, 0xF0, 0xF0, 0x60, 0x00,
34 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x3F, 0x40, 0xC0,
35 | 0xC0, 0xC0, 0xC0, 0x40, 0x3F, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x7E,
36 | 0x1C, 0x3E, 0x41, 0xC1, 0xC1, 0xC1, 0xC1, 0x41, 0x00, 0x00, 0x00, 0x00, 0x41, 0xC1, 0xC1, 0xC1,
37 | 0xC1, 0x41, 0x3E, 0x1C, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0xFF, 0x7E, 0x00, 0x00,
38 | 0x41, 0xC1, 0xC1, 0xC1, 0xC1, 0x41, 0x3E, 0x1C, 0x1C, 0x3E, 0x41, 0xC1, 0xC1, 0xC1, 0xC1, 0x41,
39 | 0x3E, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x7E, 0x1C, 0x3E, 0x41, 0xC1,
40 | 0xC1, 0xC1, 0xC1, 0x41, 0x3E, 0x1C, 0x00, 0x00, 0x41, 0xC1, 0xC1, 0xC1, 0xC1, 0x41, 0x3E, 0x1C
41 | };
42 | #endif
--------------------------------------------------------------------------------
/Libraries/Arduino/src/util/font5x7.h:
--------------------------------------------------------------------------------
1 | /*
2 | MicroView Arduino Library
3 | Copyright (C) 2014 GeekAmmo
4 |
5 | This program is free software: you can redistribute it and/or modify
6 | it under the terms of the GNU General Public License as published by
7 | the Free Software Foundation, either version 3 of the License, or
8 | (at your option) any later version.
9 |
10 | This program is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | GNU General Public License for more details.
14 |
15 | You should have received a copy of the GNU General Public License
16 | along with this program. If not, see .
17 | */
18 | #ifndef FONT5X7_H
19 | #define FONT5X7_H
20 |
21 | #include
22 |
23 | // Standard ASCII 5x7 font
24 | static const unsigned char font5x7[] PROGMEM = {
25 | // first row defines - FONTWIDTH, FONTHEIGHT, ASCII START CHAR, TOTAL CHARACTERS, FONT MAP WIDTH HIGH, FONT MAP WIDTH LOW (2,56 meaning 256)
26 | 5,8,0,255,12,75,
27 | 0x00, 0x00, 0x00, 0x00, 0x00,
28 | 0x3E, 0x5B, 0x4F, 0x5B, 0x3E,
29 | 0x3E, 0x6B, 0x4F, 0x6B, 0x3E,
30 | 0x1C, 0x3E, 0x7C, 0x3E, 0x1C,
31 | 0x18, 0x3C, 0x7E, 0x3C, 0x18,
32 | 0x1C, 0x57, 0x7D, 0x57, 0x1C,
33 | 0x1C, 0x5E, 0x7F, 0x5E, 0x1C,
34 | 0x00, 0x18, 0x3C, 0x18, 0x00,
35 | 0xFF, 0xE7, 0xC3, 0xE7, 0xFF,
36 | 0x00, 0x18, 0x24, 0x18, 0x00,
37 | 0xFF, 0xE7, 0xDB, 0xE7, 0xFF,
38 | 0x30, 0x48, 0x3A, 0x06, 0x0E,
39 | 0x26, 0x29, 0x79, 0x29, 0x26,
40 | 0x40, 0x7F, 0x05, 0x05, 0x07,
41 | 0x40, 0x7F, 0x05, 0x25, 0x3F,
42 | 0x5A, 0x3C, 0xE7, 0x3C, 0x5A,
43 | 0x7F, 0x3E, 0x1C, 0x1C, 0x08,
44 | 0x08, 0x1C, 0x1C, 0x3E, 0x7F,
45 | 0x14, 0x22, 0x7F, 0x22, 0x14,
46 | 0x5F, 0x5F, 0x00, 0x5F, 0x5F,
47 | 0x06, 0x09, 0x7F, 0x01, 0x7F,
48 | 0x00, 0x66, 0x89, 0x95, 0x6A,
49 | 0x60, 0x60, 0x60, 0x60, 0x60,
50 | 0x94, 0xA2, 0xFF, 0xA2, 0x94,
51 | 0x08, 0x04, 0x7E, 0x04, 0x08,
52 | 0x10, 0x20, 0x7E, 0x20, 0x10,
53 | 0x08, 0x08, 0x2A, 0x1C, 0x08,
54 | 0x08, 0x1C, 0x2A, 0x08, 0x08,
55 | 0x1E, 0x10, 0x10, 0x10, 0x10,
56 | 0x0C, 0x1E, 0x0C, 0x1E, 0x0C,
57 | 0x30, 0x38, 0x3E, 0x38, 0x30,
58 | 0x06, 0x0E, 0x3E, 0x0E, 0x06,
59 | 0x00, 0x00, 0x00, 0x00, 0x00,
60 | 0x00, 0x00, 0x5F, 0x00, 0x00,
61 | 0x00, 0x07, 0x00, 0x07, 0x00,
62 | 0x14, 0x7F, 0x14, 0x7F, 0x14,
63 | 0x24, 0x2A, 0x7F, 0x2A, 0x12,
64 | 0x23, 0x13, 0x08, 0x64, 0x62,
65 | 0x36, 0x49, 0x56, 0x20, 0x50,
66 | 0x00, 0x08, 0x07, 0x03, 0x00,
67 | 0x00, 0x1C, 0x22, 0x41, 0x00,
68 | 0x00, 0x41, 0x22, 0x1C, 0x00,
69 | 0x2A, 0x1C, 0x7F, 0x1C, 0x2A,
70 | 0x08, 0x08, 0x3E, 0x08, 0x08,
71 | 0x00, 0x80, 0x70, 0x30, 0x00,
72 | 0x08, 0x08, 0x08, 0x08, 0x08,
73 | 0x00, 0x00, 0x60, 0x60, 0x00,
74 | 0x20, 0x10, 0x08, 0x04, 0x02,
75 | 0x3E, 0x51, 0x49, 0x45, 0x3E,
76 | 0x00, 0x42, 0x7F, 0x40, 0x00,
77 | 0x72, 0x49, 0x49, 0x49, 0x46,
78 | 0x21, 0x41, 0x49, 0x4D, 0x33,
79 | 0x18, 0x14, 0x12, 0x7F, 0x10,
80 | 0x27, 0x45, 0x45, 0x45, 0x39,
81 | 0x3C, 0x4A, 0x49, 0x49, 0x31,
82 | 0x41, 0x21, 0x11, 0x09, 0x07,
83 | 0x36, 0x49, 0x49, 0x49, 0x36,
84 | 0x46, 0x49, 0x49, 0x29, 0x1E,
85 | 0x00, 0x00, 0x14, 0x00, 0x00,
86 | 0x00, 0x40, 0x34, 0x00, 0x00,
87 | 0x00, 0x08, 0x14, 0x22, 0x41,
88 | 0x14, 0x14, 0x14, 0x14, 0x14,
89 | 0x00, 0x41, 0x22, 0x14, 0x08,
90 | 0x02, 0x01, 0x59, 0x09, 0x06,
91 | 0x3E, 0x41, 0x5D, 0x59, 0x4E,
92 | 0x7C, 0x12, 0x11, 0x12, 0x7C,
93 | 0x7F, 0x49, 0x49, 0x49, 0x36,
94 | 0x3E, 0x41, 0x41, 0x41, 0x22,
95 | 0x7F, 0x41, 0x41, 0x41, 0x3E,
96 | 0x7F, 0x49, 0x49, 0x49, 0x41,
97 | 0x7F, 0x09, 0x09, 0x09, 0x01,
98 | 0x3E, 0x41, 0x41, 0x51, 0x73,
99 | 0x7F, 0x08, 0x08, 0x08, 0x7F,
100 | 0x00, 0x41, 0x7F, 0x41, 0x00,
101 | 0x20, 0x40, 0x41, 0x3F, 0x01,
102 | 0x7F, 0x08, 0x14, 0x22, 0x41,
103 | 0x7F, 0x40, 0x40, 0x40, 0x40,
104 | 0x7F, 0x02, 0x1C, 0x02, 0x7F,
105 | 0x7F, 0x04, 0x08, 0x10, 0x7F,
106 | 0x3E, 0x41, 0x41, 0x41, 0x3E,
107 | 0x7F, 0x09, 0x09, 0x09, 0x06,
108 | 0x3E, 0x41, 0x51, 0x21, 0x5E,
109 | 0x7F, 0x09, 0x19, 0x29, 0x46,
110 | 0x26, 0x49, 0x49, 0x49, 0x32,
111 | 0x03, 0x01, 0x7F, 0x01, 0x03,
112 | 0x3F, 0x40, 0x40, 0x40, 0x3F,
113 | 0x1F, 0x20, 0x40, 0x20, 0x1F,
114 | 0x3F, 0x40, 0x38, 0x40, 0x3F,
115 | 0x63, 0x14, 0x08, 0x14, 0x63,
116 | 0x03, 0x04, 0x78, 0x04, 0x03,
117 | 0x61, 0x59, 0x49, 0x4D, 0x43,
118 | 0x00, 0x7F, 0x41, 0x41, 0x41,
119 | 0x02, 0x04, 0x08, 0x10, 0x20,
120 | 0x00, 0x41, 0x41, 0x41, 0x7F,
121 | 0x04, 0x02, 0x01, 0x02, 0x04,
122 | 0x40, 0x40, 0x40, 0x40, 0x40,
123 | 0x00, 0x03, 0x07, 0x08, 0x00,
124 | 0x20, 0x54, 0x54, 0x78, 0x40,
125 | 0x7F, 0x28, 0x44, 0x44, 0x38,
126 | 0x38, 0x44, 0x44, 0x44, 0x28,
127 | 0x38, 0x44, 0x44, 0x28, 0x7F,
128 | 0x38, 0x54, 0x54, 0x54, 0x18,
129 | 0x00, 0x08, 0x7E, 0x09, 0x02,
130 | 0x18, 0xA4, 0xA4, 0x9C, 0x78,
131 | 0x7F, 0x08, 0x04, 0x04, 0x78,
132 | 0x00, 0x44, 0x7D, 0x40, 0x00,
133 | 0x20, 0x40, 0x40, 0x3D, 0x00,
134 | 0x7F, 0x10, 0x28, 0x44, 0x00,
135 | 0x00, 0x41, 0x7F, 0x40, 0x00,
136 | 0x7C, 0x04, 0x78, 0x04, 0x78,
137 | 0x7C, 0x08, 0x04, 0x04, 0x78,
138 | 0x38, 0x44, 0x44, 0x44, 0x38,
139 | 0xFC, 0x18, 0x24, 0x24, 0x18,
140 | 0x18, 0x24, 0x24, 0x18, 0xFC,
141 | 0x7C, 0x08, 0x04, 0x04, 0x08,
142 | 0x48, 0x54, 0x54, 0x54, 0x24,
143 | 0x04, 0x04, 0x3F, 0x44, 0x24,
144 | 0x3C, 0x40, 0x40, 0x20, 0x7C,
145 | 0x1C, 0x20, 0x40, 0x20, 0x1C,
146 | 0x3C, 0x40, 0x30, 0x40, 0x3C,
147 | 0x44, 0x28, 0x10, 0x28, 0x44,
148 | 0x4C, 0x90, 0x90, 0x90, 0x7C,
149 | 0x44, 0x64, 0x54, 0x4C, 0x44,
150 | 0x00, 0x08, 0x36, 0x41, 0x00,
151 | 0x00, 0x00, 0x77, 0x00, 0x00,
152 | 0x00, 0x41, 0x36, 0x08, 0x00,
153 | 0x02, 0x01, 0x02, 0x04, 0x02,
154 | 0x3C, 0x26, 0x23, 0x26, 0x3C,
155 | 0x1E, 0xA1, 0xA1, 0x61, 0x12,
156 | 0x3A, 0x40, 0x40, 0x20, 0x7A,
157 | 0x38, 0x54, 0x54, 0x55, 0x59,
158 | 0x21, 0x55, 0x55, 0x79, 0x41,
159 | 0x21, 0x54, 0x54, 0x78, 0x41,
160 | 0x21, 0x55, 0x54, 0x78, 0x40,
161 | 0x20, 0x54, 0x55, 0x79, 0x40,
162 | 0x0C, 0x1E, 0x52, 0x72, 0x12,
163 | 0x39, 0x55, 0x55, 0x55, 0x59,
164 | 0x39, 0x54, 0x54, 0x54, 0x59,
165 | 0x39, 0x55, 0x54, 0x54, 0x58,
166 | 0x00, 0x00, 0x45, 0x7C, 0x41,
167 | 0x00, 0x02, 0x45, 0x7D, 0x42,
168 | 0x00, 0x01, 0x45, 0x7C, 0x40,
169 | 0xF0, 0x29, 0x24, 0x29, 0xF0,
170 | 0xF0, 0x28, 0x25, 0x28, 0xF0,
171 | 0x7C, 0x54, 0x55, 0x45, 0x00,
172 | 0x20, 0x54, 0x54, 0x7C, 0x54,
173 | 0x7C, 0x0A, 0x09, 0x7F, 0x49,
174 | 0x32, 0x49, 0x49, 0x49, 0x32,
175 | 0x32, 0x48, 0x48, 0x48, 0x32,
176 | 0x32, 0x4A, 0x48, 0x48, 0x30,
177 | 0x3A, 0x41, 0x41, 0x21, 0x7A,
178 | 0x3A, 0x42, 0x40, 0x20, 0x78,
179 | 0x00, 0x9D, 0xA0, 0xA0, 0x7D,
180 | 0x39, 0x44, 0x44, 0x44, 0x39,
181 | 0x3D, 0x40, 0x40, 0x40, 0x3D,
182 | 0x3C, 0x24, 0xFF, 0x24, 0x24,
183 | 0x48, 0x7E, 0x49, 0x43, 0x66,
184 | 0x2B, 0x2F, 0xFC, 0x2F, 0x2B,
185 | 0xFF, 0x09, 0x29, 0xF6, 0x20,
186 | 0xC0, 0x88, 0x7E, 0x09, 0x03,
187 | 0x20, 0x54, 0x54, 0x79, 0x41,
188 | 0x00, 0x00, 0x44, 0x7D, 0x41,
189 | 0x30, 0x48, 0x48, 0x4A, 0x32,
190 | 0x38, 0x40, 0x40, 0x22, 0x7A,
191 | 0x00, 0x7A, 0x0A, 0x0A, 0x72,
192 | 0x7D, 0x0D, 0x19, 0x31, 0x7D,
193 | 0x26, 0x29, 0x29, 0x2F, 0x28,
194 | 0x26, 0x29, 0x29, 0x29, 0x26,
195 | 0x30, 0x48, 0x4D, 0x40, 0x20,
196 | 0x38, 0x08, 0x08, 0x08, 0x08,
197 | 0x08, 0x08, 0x08, 0x08, 0x38,
198 | 0x2F, 0x10, 0xC8, 0xAC, 0xBA,
199 | 0x2F, 0x10, 0x28, 0x34, 0xFA,
200 | 0x00, 0x00, 0x7B, 0x00, 0x00,
201 | 0x08, 0x14, 0x2A, 0x14, 0x22,
202 | 0x22, 0x14, 0x2A, 0x14, 0x08,
203 | 0xAA, 0x00, 0x55, 0x00, 0xAA,
204 | 0xAA, 0x55, 0xAA, 0x55, 0xAA,
205 | 0x00, 0x00, 0x00, 0xFF, 0x00,
206 | 0x10, 0x10, 0x10, 0xFF, 0x00,
207 | 0x14, 0x14, 0x14, 0xFF, 0x00,
208 | 0x10, 0x10, 0xFF, 0x00, 0xFF,
209 | 0x10, 0x10, 0xF0, 0x10, 0xF0,
210 | 0x14, 0x14, 0x14, 0xFC, 0x00,
211 | 0x14, 0x14, 0xF7, 0x00, 0xFF,
212 | 0x00, 0x00, 0xFF, 0x00, 0xFF,
213 | 0x14, 0x14, 0xF4, 0x04, 0xFC,
214 | 0x14, 0x14, 0x17, 0x10, 0x1F,
215 | 0x10, 0x10, 0x1F, 0x10, 0x1F,
216 | 0x14, 0x14, 0x14, 0x1F, 0x00,
217 | 0x10, 0x10, 0x10, 0xF0, 0x00,
218 | 0x00, 0x00, 0x00, 0x1F, 0x10,
219 | 0x10, 0x10, 0x10, 0x1F, 0x10,
220 | 0x10, 0x10, 0x10, 0xF0, 0x10,
221 | 0x00, 0x00, 0x00, 0xFF, 0x10,
222 | 0x10, 0x10, 0x10, 0x10, 0x10,
223 | 0x10, 0x10, 0x10, 0xFF, 0x10,
224 | 0x00, 0x00, 0x00, 0xFF, 0x14,
225 | 0x00, 0x00, 0xFF, 0x00, 0xFF,
226 | 0x00, 0x00, 0x1F, 0x10, 0x17,
227 | 0x00, 0x00, 0xFC, 0x04, 0xF4,
228 | 0x14, 0x14, 0x17, 0x10, 0x17,
229 | 0x14, 0x14, 0xF4, 0x04, 0xF4,
230 | 0x00, 0x00, 0xFF, 0x00, 0xF7,
231 | 0x14, 0x14, 0x14, 0x14, 0x14,
232 | 0x14, 0x14, 0xF7, 0x00, 0xF7,
233 | 0x14, 0x14, 0x14, 0x17, 0x14,
234 | 0x10, 0x10, 0x1F, 0x10, 0x1F,
235 | 0x14, 0x14, 0x14, 0xF4, 0x14,
236 | 0x10, 0x10, 0xF0, 0x10, 0xF0,
237 | 0x00, 0x00, 0x1F, 0x10, 0x1F,
238 | 0x00, 0x00, 0x00, 0x1F, 0x14,
239 | 0x00, 0x00, 0x00, 0xFC, 0x14,
240 | 0x00, 0x00, 0xF0, 0x10, 0xF0,
241 | 0x10, 0x10, 0xFF, 0x10, 0xFF,
242 | 0x14, 0x14, 0x14, 0xFF, 0x14,
243 | 0x10, 0x10, 0x10, 0x1F, 0x00,
244 | 0x00, 0x00, 0x00, 0xF0, 0x10,
245 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
246 | 0xF0, 0xF0, 0xF0, 0xF0, 0xF0,
247 | 0xFF, 0xFF, 0xFF, 0x00, 0x00,
248 | 0x00, 0x00, 0x00, 0xFF, 0xFF,
249 | 0x0F, 0x0F, 0x0F, 0x0F, 0x0F,
250 | 0x38, 0x44, 0x44, 0x38, 0x44,
251 | 0x7C, 0x2A, 0x2A, 0x3E, 0x14,
252 | 0x7E, 0x02, 0x02, 0x06, 0x06,
253 | 0x02, 0x7E, 0x02, 0x7E, 0x02,
254 | 0x63, 0x55, 0x49, 0x41, 0x63,
255 | 0x38, 0x44, 0x44, 0x3C, 0x04,
256 | 0x40, 0x7E, 0x20, 0x1E, 0x20,
257 | 0x06, 0x02, 0x7E, 0x02, 0x02,
258 | 0x99, 0xA5, 0xE7, 0xA5, 0x99,
259 | 0x1C, 0x2A, 0x49, 0x2A, 0x1C,
260 | 0x4C, 0x72, 0x01, 0x72, 0x4C,
261 | 0x30, 0x4A, 0x4D, 0x4D, 0x30,
262 | 0x30, 0x48, 0x78, 0x48, 0x30,
263 | 0xBC, 0x62, 0x5A, 0x46, 0x3D,
264 | 0x3E, 0x49, 0x49, 0x49, 0x00,
265 | 0x7E, 0x01, 0x01, 0x01, 0x7E,
266 | 0x2A, 0x2A, 0x2A, 0x2A, 0x2A,
267 | 0x44, 0x44, 0x5F, 0x44, 0x44,
268 | 0x40, 0x51, 0x4A, 0x44, 0x40,
269 | 0x40, 0x44, 0x4A, 0x51, 0x40,
270 | 0x00, 0x00, 0xFF, 0x01, 0x03,
271 | 0xE0, 0x80, 0xFF, 0x00, 0x00,
272 | 0x08, 0x08, 0x6B, 0x6B, 0x08,
273 | 0x36, 0x12, 0x36, 0x24, 0x36,
274 | 0x06, 0x0F, 0x09, 0x0F, 0x06,
275 | 0x00, 0x00, 0x18, 0x18, 0x00,
276 | 0x00, 0x00, 0x10, 0x10, 0x00,
277 | 0x30, 0x40, 0xFF, 0x01, 0x01,
278 | 0x00, 0x1F, 0x01, 0x01, 0x1E,
279 | 0x00, 0x19, 0x1D, 0x17, 0x12,
280 | 0x00, 0x3C, 0x3C, 0x3C, 0x3C,
281 | 0x00, 0x00, 0x00, 0x00, 0x00
282 | };
283 | #endif // FONT5X7_H
284 |
--------------------------------------------------------------------------------
/Libraries/Arduino/src/util/font8x16.h:
--------------------------------------------------------------------------------
1 | /*
2 | MicroView Arduino Library
3 | Copyright (C) 2014 GeekAmmo
4 |
5 | This program is free software: you can redistribute it and/or modify
6 | it under the terms of the GNU General Public License as published by
7 | the Free Software Foundation, either version 3 of the License, or
8 | (at your option) any later version.
9 |
10 | This program is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | GNU General Public License for more details.
14 |
15 | You should have received a copy of the GNU General Public License
16 | along with this program. If not, see .
17 | */
18 | #ifndef FONT8X16_H
19 | #define FONT8X16_H
20 |
21 | #include
22 |
23 | static const unsigned char font8x16[] PROGMEM = {
24 | // first row defines - FONTWIDTH, FONTHEIGHT, ASCII START CHAR, TOTAL CHARACTERS, FONT MAP WIDTH HIGH, FONT MAP WIDTH LOW (2,56 meaning 256)
25 | 8,16,32,96,2,56,
26 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00,
27 | 0x00, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0xD0, 0xBE, 0x90, 0xD0, 0xBE, 0x90, 0x00,
28 | 0x00, 0x1C, 0x62, 0xFF, 0xC2, 0x80, 0x00, 0x00, 0x0C, 0x12, 0x92, 0x4C, 0xB0, 0x88, 0x06, 0x00,
29 | 0x80, 0x7C, 0x62, 0xB2, 0x1C, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x0E, 0x00, 0x00, 0x00, 0x00,
30 | 0x00, 0xE0, 0x18, 0x04, 0x02, 0x02, 0x00, 0x00, 0x00, 0x02, 0x02, 0x04, 0x18, 0xE0, 0x00, 0x00,
31 | 0x00, 0x24, 0x18, 0x7E, 0x18, 0x24, 0x00, 0x00, 0x80, 0x80, 0x80, 0xF0, 0x80, 0x80, 0x80, 0x00,
32 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00,
33 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x60, 0x18, 0x06, 0x00, 0x00,
34 | 0xF8, 0x04, 0xC2, 0x32, 0x0C, 0xF8, 0x00, 0x00, 0x00, 0x04, 0x04, 0xFE, 0x00, 0x00, 0x00, 0x00,
35 | 0x00, 0x02, 0x82, 0x42, 0x22, 0x1C, 0x00, 0x00, 0x00, 0x02, 0x22, 0x22, 0x22, 0xDC, 0x00, 0x00,
36 | 0xC0, 0xA0, 0x98, 0x84, 0xFE, 0x80, 0x80, 0x00, 0x00, 0x1E, 0x12, 0x12, 0x22, 0xC2, 0x00, 0x00,
37 | 0xF8, 0x44, 0x22, 0x22, 0x22, 0xC0, 0x00, 0x00, 0x00, 0x02, 0x02, 0xC2, 0x32, 0x0A, 0x06, 0x00,
38 | 0x00, 0x8C, 0x52, 0x22, 0x52, 0x8C, 0x00, 0x00, 0x3C, 0x42, 0x42, 0x42, 0x26, 0xF8, 0x00, 0x00,
39 | 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00,
40 | 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00,
41 | 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x02, 0x82, 0x42, 0x22, 0x1C, 0x00, 0x00,
42 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
43 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
44 | 0x00, 0x04, 0x04, 0x0F, 0x04, 0x03, 0x00, 0x00, 0x04, 0x02, 0x01, 0x03, 0x04, 0x04, 0x03, 0x00,
45 | 0x03, 0x04, 0x04, 0x04, 0x05, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
46 | 0x00, 0x03, 0x06, 0x08, 0x10, 0x10, 0x00, 0x00, 0x00, 0x10, 0x10, 0x08, 0x06, 0x03, 0x00, 0x00,
47 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
48 | 0x00, 0x00, 0x16, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
49 | 0x00, 0x00, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
50 | 0x01, 0x03, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x04, 0x04, 0x07, 0x04, 0x04, 0x00, 0x00,
51 | 0x00, 0x07, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00,
52 | 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00,
53 | 0x01, 0x02, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
54 | 0x00, 0x03, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00,
55 | 0x00, 0x00, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x0E, 0x00, 0x00, 0x00, 0x00,
56 | 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x04, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00,
57 | 0x04, 0x02, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00,
58 | 0xF8, 0x04, 0x72, 0x8A, 0xFA, 0x84, 0x78, 0x00, 0x00, 0xC0, 0x38, 0x06, 0x38, 0xC0, 0x00, 0x00,
59 | 0x00, 0xFE, 0x22, 0x22, 0x22, 0xDC, 0x00, 0x00, 0xF8, 0x04, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00,
60 | 0xFE, 0x02, 0x02, 0x02, 0x04, 0xF8, 0x00, 0x00, 0x00, 0xFE, 0x22, 0x22, 0x22, 0x22, 0x00, 0x00,
61 | 0x00, 0xFE, 0x22, 0x22, 0x22, 0x22, 0x00, 0x00, 0xF8, 0x04, 0x02, 0x02, 0x22, 0xE2, 0x00, 0x00,
62 | 0xFE, 0x20, 0x20, 0x20, 0x20, 0xFE, 0x00, 0x00, 0x00, 0x02, 0x02, 0xFE, 0x02, 0x02, 0x00, 0x00,
63 | 0x00, 0x00, 0x00, 0x02, 0x02, 0xFE, 0x00, 0x00, 0xFE, 0x40, 0xB0, 0x08, 0x04, 0x02, 0x00, 0x00,
64 | 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x0C, 0x70, 0x80, 0x70, 0x0C, 0xFE, 0x00,
65 | 0xFE, 0x0C, 0x30, 0xC0, 0x00, 0xFE, 0x00, 0x00, 0xF8, 0x04, 0x02, 0x02, 0x04, 0xF8, 0x00, 0x00,
66 | 0xFE, 0x42, 0x42, 0x42, 0x22, 0x1C, 0x00, 0x00, 0xF8, 0x04, 0x02, 0x02, 0x04, 0xF8, 0x00, 0x00,
67 | 0x00, 0xFE, 0x42, 0x42, 0xA2, 0x1C, 0x00, 0x00, 0x00, 0x1C, 0x22, 0x42, 0x42, 0x80, 0x00, 0x00,
68 | 0x02, 0x02, 0x02, 0xFE, 0x02, 0x02, 0x02, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00,
69 | 0x06, 0x38, 0xC0, 0x00, 0xC0, 0x38, 0x06, 0x00, 0x3E, 0xC0, 0xF0, 0x0E, 0xF0, 0xC0, 0x3E, 0x00,
70 | 0x00, 0x06, 0x98, 0x60, 0x98, 0x06, 0x00, 0x00, 0x00, 0x06, 0x18, 0xE0, 0x18, 0x06, 0x00, 0x00,
71 | 0x02, 0x02, 0xC2, 0x32, 0x0A, 0x06, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x02, 0x02, 0x02, 0x02, 0x00,
72 | 0x00, 0x06, 0x18, 0x60, 0x80, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x02, 0xFE, 0x00, 0x00, 0x00,
73 | 0x40, 0x30, 0x0C, 0x0C, 0x30, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
74 | 0x01, 0x02, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x06, 0x01, 0x01, 0x01, 0x01, 0x01, 0x06, 0x00,
75 | 0x00, 0x07, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00,
76 | 0x07, 0x04, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x07, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00,
77 | 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x04, 0x07, 0x00, 0x00,
78 | 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x04, 0x07, 0x04, 0x04, 0x00, 0x00,
79 | 0x00, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x07, 0x00, 0x00, 0x01, 0x02, 0x04, 0x00, 0x00,
80 | 0x00, 0x07, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x07, 0x00, 0x00, 0x01, 0x00, 0x00, 0x07, 0x00,
81 | 0x07, 0x00, 0x00, 0x00, 0x03, 0x07, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00,
82 | 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x0C, 0x12, 0x11, 0x10, 0x00,
83 | 0x00, 0x07, 0x00, 0x00, 0x01, 0x06, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00,
84 | 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00,
85 | 0x00, 0x00, 0x01, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00,
86 | 0x00, 0x06, 0x01, 0x00, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
87 | 0x06, 0x05, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x10, 0x10, 0x10, 0x10, 0x00,
88 | 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x00, 0x10, 0x10, 0x10, 0x10, 0x1F, 0x00, 0x00, 0x00,
89 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00,
90 | 0x00, 0x00, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0xF0, 0x00, 0x00,
91 | 0x00, 0xFE, 0x20, 0x10, 0x10, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00,
92 | 0x00, 0xE0, 0x10, 0x10, 0x10, 0xFE, 0x00, 0x00, 0x00, 0xE0, 0x90, 0x90, 0x90, 0xE0, 0x00, 0x00,
93 | 0x00, 0x20, 0xFC, 0x22, 0x22, 0x22, 0x02, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0xF0, 0x00, 0x00,
94 | 0x00, 0xFE, 0x20, 0x10, 0x10, 0xE0, 0x00, 0x00, 0x10, 0x10, 0xF2, 0x00, 0x00, 0x00, 0x00, 0x00,
95 | 0x00, 0x10, 0x10, 0x10, 0xF2, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x80, 0x40, 0x20, 0x10, 0x00, 0x00,
96 | 0x00, 0x02, 0x02, 0xFE, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x20, 0x10, 0xF0, 0x20, 0x10, 0xF0, 0x00,
97 | 0x00, 0xF0, 0x20, 0x10, 0x10, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0xE0, 0x00, 0x00,
98 | 0x00, 0xF0, 0x20, 0x10, 0x10, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0xF0, 0x00, 0x00,
99 | 0x00, 0xF0, 0x20, 0x10, 0x10, 0x70, 0x00, 0x00, 0x00, 0x60, 0x90, 0x90, 0x90, 0x20, 0x00, 0x00,
100 | 0x00, 0x20, 0x20, 0xFC, 0x20, 0x20, 0x20, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00,
101 | 0x00, 0x70, 0x80, 0x00, 0x80, 0x70, 0x00, 0x00, 0xF0, 0x00, 0xC0, 0x30, 0xC0, 0x00, 0xF0, 0x00,
102 | 0x00, 0x30, 0xC0, 0xC0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x30, 0xC0, 0x00, 0x80, 0x70, 0x00, 0x00,
103 | 0x00, 0x10, 0x10, 0x90, 0x50, 0x30, 0x00, 0x00, 0x00, 0x80, 0x80, 0x7E, 0x02, 0x02, 0x00, 0x00,
104 | 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x7E, 0x80, 0x80, 0x00, 0x00,
105 | 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
106 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x02, 0x07, 0x00, 0x00,
107 | 0x00, 0x07, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00,
108 | 0x00, 0x03, 0x04, 0x04, 0x02, 0x07, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00,
109 | 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x24, 0x24, 0x22, 0x1F, 0x00, 0x00,
110 | 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x04, 0x04, 0x00, 0x00, 0x00,
111 | 0x20, 0x20, 0x20, 0x20, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x01, 0x02, 0x04, 0x00, 0x00,
112 | 0x00, 0x00, 0x00, 0x07, 0x04, 0x04, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00,
113 | 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00,
114 | 0x00, 0x3F, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x02, 0x3F, 0x00, 0x00,
115 | 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00,
116 | 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x00, 0x00, 0x03, 0x04, 0x04, 0x02, 0x07, 0x00, 0x00,
117 | 0x00, 0x00, 0x03, 0x04, 0x03, 0x00, 0x00, 0x00, 0x01, 0x06, 0x01, 0x00, 0x01, 0x06, 0x01, 0x00,
118 | 0x00, 0x06, 0x01, 0x01, 0x06, 0x00, 0x00, 0x00, 0x20, 0x20, 0x31, 0x0E, 0x03, 0x00, 0x00, 0x00,
119 | 0x00, 0x06, 0x05, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x10, 0x10, 0x00, 0x00,
120 | 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x1F, 0x00, 0x00, 0x00, 0x00,
121 | 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
122 | };
123 | #endif
124 |
125 |
--------------------------------------------------------------------------------
/Libraries/Arduino/src/util/fontlargenumber.h:
--------------------------------------------------------------------------------
1 | /*
2 | MicroView Arduino Library
3 | Copyright (C) 2014 GeekAmmo
4 |
5 | This program is free software: you can redistribute it and/or modify
6 | it under the terms of the GNU General Public License as published by
7 | the Free Software Foundation, either version 3 of the License, or
8 | (at your option) any later version.
9 |
10 | This program is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | GNU General Public License for more details.
14 |
15 | You should have received a copy of the GNU General Public License
16 | along with this program. If not, see .
17 | */
18 | #ifndef FONTLARGENUMBER_H
19 | #define FONTLARGENUMBER_H
20 |
21 | #include
22 |
23 | static const unsigned char fontlargenumber[] PROGMEM = {
24 | // first row defines - FONTWIDTH, FONTHEIGHT, ASCII START CHAR, TOTAL CHARACTERS, FONT MAP WIDTH HIGH, FONT MAP WIDTH LOW (2,56 meaning 256)
25 | 12,48,48,11,1,32,
26 | 0x00, 0xC0, 0xF8, 0x7C, 0x3E, 0x3E, 0xFC, 0xF8, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xE0,
27 | 0x78, 0xFE, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x7C, 0x3C, 0x3E, 0x3E, 0xFE, 0xFC,
28 | 0xE0, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x3E, 0x3E, 0x3E, 0xFE, 0xF8, 0xC0, 0x00, 0x00, 0x00, 0x00,
29 | 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFE, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFE, 0x3E,
30 | 0x3E, 0x3E, 0x3E, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xF0, 0xFC, 0x3E, 0x3E, 0x3E,
31 | 0xFC, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0xFE, 0xFE, 0x00, 0x00,
32 | 0x00, 0x00, 0xC0, 0xF8, 0xFE, 0x3E, 0x7E, 0xFC, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFC,
33 | 0x7E, 0x3E, 0xFE, 0xF8, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xE0, 0xC0, 0x00,
34 | 0x00, 0x00, 0x00, 0x00, 0xF0, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0xF9, 0xFF, 0xFF, 0xF0, 0x00, 0x00,
35 | 0x00, 0x00, 0x07, 0x03, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
36 | 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF,
37 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x1F, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00,
38 | 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F,
39 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFC,
40 | 0x7F, 0x03, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00,
41 | 0x00, 0xFE, 0xFF, 0x03, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
42 | 0x3F, 0x7F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xE0, 0xFF, 0x1F, 0x00,
43 | 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00,
44 | 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFE, 0x1F, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xF8,
45 | 0xFC, 0xFF, 0xC7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFE, 0x3F, 0x03, 0x00, 0xFF, 0xFF,
46 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x3F, 0x3E, 0x7E, 0xFC, 0xF8, 0xE0, 0x00, 0x00, 0x00, 0x00,
47 | 0x00, 0xFF, 0xFF, 0x80, 0xF0, 0x7C, 0x7C, 0xF8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
48 | 0x80, 0xF8, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x9F, 0xFF, 0xF8, 0xFE, 0x1F,
49 | 0x01, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xC0, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0x00, 0x00,
50 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xC0, 0xFC,
51 | 0x7F, 0x03, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00,
52 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFE, 0x0F, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
53 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0F, 0xFF, 0xF8, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xE7, 0xE0,
54 | 0xE0, 0xE0, 0xFF, 0xFF, 0xE0, 0xE0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFF,
55 | 0xFE, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x00, 0x00,
56 | 0x00, 0x00, 0x00, 0xF0, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFC, 0x3F,
57 | 0x03, 0x03, 0x1F, 0xFF, 0xFC, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x1F, 0x3E, 0x3E, 0x0F, 0x01,
58 | 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
59 | 0x07, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
60 | 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFE, 0x0F, 0x00, 0x00, 0x00, 0x00,
61 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0x7F, 0x00, 0x00, 0x00,
62 | 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0xFF, 0xFF, 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
63 | 0x00, 0x00, 0xC0, 0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x80,
64 | 0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
65 | 0x00, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
66 | 0x00, 0x00, 0x80, 0xFC, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x00,
67 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1F, 0x3F, 0x7C, 0x7C, 0x3F, 0x1F, 0x03, 0x00, 0x00, 0x00,
68 | 0x00, 0x00, 0x7C, 0x7C, 0x7C, 0x7F, 0x7F, 0x7C, 0x7C, 0x7C, 0x00, 0x00, 0x00, 0x7F, 0x7F, 0x7C,
69 | 0x7C, 0x7C, 0x7C, 0x7C, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x7E, 0x7C, 0x7C, 0x7E, 0x1F, 0x07,
70 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x7F, 0x00, 0x00, 0x00, 0x00,
71 | 0x00, 0x1F, 0x3E, 0x7C, 0x7C, 0x3E, 0x1F, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1F,
72 | 0x7F, 0x7C, 0x7C, 0x3F, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x7F, 0x00, 0x00, 0x00, 0x00,
73 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x1F, 0x3F, 0x7E, 0x7C, 0x7E, 0x3F, 0x1F, 0x01, 0x00, 0x00,
74 | 0x00, 0x00, 0x3E, 0x7C, 0x7C, 0x7E, 0x3F, 0x0F, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
75 | 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
76 | };
77 | #endif
78 |
--------------------------------------------------------------------------------
/Libraries/Arduino/src/util/space01.h:
--------------------------------------------------------------------------------
1 | /*
2 | MicroView Arduino Library
3 | Copyright (C) 2014 GeekAmmo
4 |
5 | This program is free software: you can redistribute it and/or modify
6 | it under the terms of the GNU General Public License as published by
7 | the Free Software Foundation, either version 3 of the License, or
8 | (at your option) any later version.
9 |
10 | This program is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | GNU General Public License for more details.
14 |
15 | You should have received a copy of the GNU General Public License
16 | along with this program. If not, see .
17 | */
18 | #ifndef SPACE01_H
19 | #define SPACE01_H
20 |
21 | #include
22 |
23 | static const unsigned char space01[] PROGMEM = {
24 | // first row defines - FONTWIDTH, FONTHEIGHT, ASCII START CHAR, TOTAL CHARACTERS, FONT MAP WIDTH HIGH, FONT MAP WIDTH LOW (2,56 meaning 256)
25 | 22,16,48,2,0,44,
26 | 0xFC, 0xFC, 0xC0, 0xC0, 0xF3, 0xF3, 0x3C, 0x3C, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0x3C, 0x3C,
27 | 0xF3, 0xF3, 0xC0, 0xC0, 0xFC, 0xFC, 0x00, 0x00, 0xC0, 0xC0, 0xF3, 0xF3, 0x3C, 0x3C, 0xF0, 0xF0,
28 | 0xF0, 0xF0, 0xF0, 0xF0, 0x3C, 0x3C, 0xF3, 0xF3, 0xC0, 0xC0, 0x00, 0x00, 0x03, 0x03, 0xCF, 0xCF,
29 | 0x3F, 0x3F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x3F, 0x3F, 0xCF, 0xCF,
30 | 0x03, 0x03, 0x3F, 0x3F, 0x03, 0x03, 0x3F, 0x3F, 0xCF, 0xCF, 0xCF, 0xCF, 0x0F, 0x0F, 0xCF, 0xCF,
31 | 0xCF, 0xCF, 0x3F, 0x3F, 0x03, 0x03, 0x3F, 0x3F,
32 | };
33 | #endif
34 |
--------------------------------------------------------------------------------
/Libraries/Arduino/src/util/space02.h:
--------------------------------------------------------------------------------
1 | /*
2 | MicroView Arduino Library
3 | Copyright (C) 2014 GeekAmmo
4 |
5 | This program is free software: you can redistribute it and/or modify
6 | it under the terms of the GNU General Public License as published by
7 | the Free Software Foundation, either version 3 of the License, or
8 | (at your option) any later version.
9 |
10 | This program is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | GNU General Public License for more details.
14 |
15 | You should have received a copy of the GNU General Public License
16 | along with this program. If not, see .
17 | */
18 | #ifndef SPACE02_H
19 | #define SPACE02_H
20 |
21 | #include
22 |
23 | static const unsigned char space02[] PROGMEM = {
24 | // first row defines - FONTWIDTH, FONTHEIGHT, ASCII START CHAR, TOTAL CHARACTERS, FONT MAP WIDTH HIGH, FONT MAP WIDTH LOW (2,56 meaning 256)
25 | 24,16,48,2,0,48,
26 | 0xF0, 0xF0, 0xFC, 0xFC, 0xFC, 0xFC, 0x3C, 0x3C, 0x3F, 0x3F, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x3F,
27 | 0x3C, 0x3C, 0xFC, 0xFC, 0xFC, 0xFC, 0xF0, 0xF0, 0xF0, 0xF0, 0xFC, 0xFC, 0xFC, 0xFC, 0x3C, 0x3C,
28 | 0x3F, 0x3F, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x3F, 0x3C, 0x3C, 0xFC, 0xFC, 0xFC, 0xFC, 0xF0, 0xF0,
29 | 0xC3, 0xC3, 0xC3, 0xC3, 0x33, 0x33, 0x3F, 0x3F, 0x0F, 0x0F, 0x33, 0x33, 0x33, 0x33, 0x0F, 0x0F,
30 | 0x3F, 0x3F, 0x33, 0x33, 0xC3, 0xC3, 0xC3, 0xC3, 0x03, 0x03, 0x33, 0x33, 0xFF, 0xFF, 0xCF, 0xCF,
31 | 0x0F, 0x0F, 0x33, 0x33, 0x33, 0x33, 0x0F, 0x0F, 0xCF, 0xCF, 0xFF, 0xFF, 0x33, 0x33, 0x03, 0x03
32 | };
33 | #endif
34 |
--------------------------------------------------------------------------------
/Libraries/Arduino/src/util/space03.h:
--------------------------------------------------------------------------------
1 | /*
2 | MicroView Arduino Library
3 | Copyright (C) 2014 GeekAmmo
4 |
5 | This program is free software: you can redistribute it and/or modify
6 | it under the terms of the GNU General Public License as published by
7 | the Free Software Foundation, either version 3 of the License, or
8 | (at your option) any later version.
9 |
10 | This program is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | GNU General Public License for more details.
14 |
15 | You should have received a copy of the GNU General Public License
16 | along with this program. If not, see .
17 | */
18 | #ifndef SPACE03_H
19 | #define SPACE03_H
20 |
21 | #include
22 |
23 | static const unsigned char space03[] PROGMEM = {
24 | // first row defines - FONTWIDTH, FONTHEIGHT, ASCII START CHAR, TOTAL CHARACTERS, FONT MAP WIDTH HIGH, FONT MAP WIDTH LOW (2,56 meaning 256)
25 | 16,16,48,2,0,32,
26 | 0xC0, 0xC0, 0xF0, 0xF0, 0x3C, 0x3C, 0xFF, 0xFF, 0xFF, 0xFF, 0x3C, 0x3C, 0xF0, 0xF0, 0xC0, 0xC0,
27 | 0xC0, 0xC0, 0xF0, 0xF0, 0x3C, 0x3C, 0xFF, 0xFF, 0xFF, 0xFF, 0x3C, 0x3C, 0xF0, 0xF0, 0xC0, 0xC0,
28 | 0xC3, 0xC3, 0x33, 0x33, 0xCF, 0xCF, 0x33, 0x33, 0x33, 0x33, 0xCF, 0xCF, 0x33, 0x33, 0xC3, 0xC3,
29 | 0x33, 0x33, 0xCF, 0xCF, 0x03, 0x03, 0x0F, 0x0F, 0x0F, 0x0F, 0x03, 0x03, 0xCF, 0xCF, 0x33, 0x33
30 | };
31 | #endif
32 |
--------------------------------------------------------------------------------
/Libraries/README.md:
--------------------------------------------------------------------------------
1 | SparkFun MicroView Libraries
2 | =================================
3 |
4 | Libraries for use in different environments.
5 |
6 |
7 | Directory Contents
8 | -------------------
9 | * **/Arduino** - [Arduino IDE](http://www.arduino.cc/en/Main/Software) libraries
10 |
11 |
12 | License Information
13 | -------------------
14 | This product is open source!
15 |
16 | The code is released under the GPL v3 license. For more information see the included LICENSE.md file.
17 |
18 | Distributed as-is; no warranty is given.
19 |
20 | - Your friends at SparkFun.
21 |
22 |
23 |
24 | BUILD INSTRUCTIONS:
25 | -------------------
26 | To get the most up-to-date version of the library, please use the following git subtree commands.
27 |
28 | $git subtree add -P Libraries/Arduino --squash https://github.com/sparkfun/SparkFun_MicroView_Arduino_Library.git master
29 |
30 | $git subtree pull -P Libraries/Arduino --squash https://github.com/sparkfun/SparkFun_MicroView_Arduino_Library.git master
31 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | MicroView
2 | =============
3 |
4 | 
5 |
6 | [*SparkFun Microview (DEV-12923)*](https://www.sparkfun.com/products/12923)
7 |
8 | The MicroView is a chip-sized Arduino with a built-in OLED. Compatible with the MicroView USB Programmer linked below.
9 |
10 | Repository Contents
11 | -------------------
12 | * **/Datasheets** - Datasheets for the OLED module
13 | * **/Enclosure** - 3D model of the standard Microview Enclosure
14 | * **/Hardware** - All Eagle design files (.brd, .sch)
15 | * **/Libraries** - All Arduino libraries and board examples
16 | * **/Production** - Test bed files and production panel files
17 |
18 | Product Versions
19 | ----------------
20 | * [DEV-12923](https://www.sparkfun.com/products/12923)- Version 1.0
21 | * [DEV-12924](https://www.sparkfun.com/products/12924)- MicroView USB Programmer version 0.2
22 |
23 | License Information
24 | -------------------
25 | The hardware is released under [Creative Commons ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/).
26 | The code is beerware; if you see me (or any other SparkFun employee) at the local, and you've found our code helpful, please buy us a round!
27 |
28 | Distributed as-is; no warranty is given.
29 |
--------------------------------------------------------------------------------