-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathatom.xml
512 lines (358 loc) · 29.4 KB
/
atom.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Learn MicroView</title>
<link href="http://learn.microview.io/" rel="self"/>
<link href="http://learn.microview.io"/>
<updated>2014-06-14T08:41:37+10:00</updated>
<id>http://learn.microview.io</id>
<author>
<name>Geek Ammo</name>
<email></email>
</author>
<entry>
<title>Creating Fonts for MicroView</title>
<link href="http://learn.microview.io/font/creating-fonts-for-microview.html"/>
<updated>2014-06-11T00:00:00+10:00</updated>
<id>http://learn.microview.io/font/creating-fonts-for-microview</id>
<content type="html"><p>From the previous article <a href="/intro/general-overview-of-microview.html">General Overview of MicroView</a>, we have covered how the <a href="https://github.com/geekammo/MicroView-Arduino-Library">MicroView library</a> allocated 384 bytes of RAM as screen buffer from ATmega328P to perform graphic operations before transferring this block of memory to the SSD1306 OLED controller’s memory.
The following diagram shows how two 5x8 pixel characters are drawn on the screen buffer.</p>
<p><img src="/images/MicroView_5x8_FontMapping.png" alt="MicroView 5x8 Font Mapping" /></p>
<p>From the diagram, “O” character appeared on ROW0 took up 5 bytes of RAM from the screen buffer in the following order:</p>
<pre><code>BYTE0 = 0x7e
BYTE1 = 0x81
BYTE2 = 0x81
BYTE3 = 0x81
BYTE4 = 0x7e
</code></pre>
<p>Character “A” that was shown on ROW1 took up 5 bytes of RAM from the screen buffer in the following order:</p>
<pre><code>BYTE64 = 0xfc
BYTE65 = 0x22
BYTE66 = 0x21
BYTE67 = 0x22
BYTE68 = 0xfc
</code></pre>
<p>A 8x16 font will take up 16 bytes of RAM from the screen buffer as shown in the next diagram:</p>
<p><img src="/images/MicroView_8x16_FontMapping.png" alt="MicroView 8x16 Font Mapping" /></p>
<p>With 8x16 font taking up RAM from screen buffer’s ROW0 and ROW1, the data of the above diagram will occupy the screen buffer’s BYTE0 – BYTE7 and BYTE64 – BYTE71.</p>
<pre><code>BYTE0 = 0xf8
BYTE1 = 0xfc
BYTE2 = 0x06
BYTE3 = 0x03
BYTE4 = 0x03
BYTE5 = 0x06
BYTE6 = 0xfc
BYTE7 = 0xf8
BYTE64 = 0xff
BYTE65 = 0xff
BYTE66 = 0x06
BYTE67 = 0x06
BYTE68 = 0x06
BYTE69 = 0x06
BYTE70 = 0xff
BYTE71 = 0xff
</code></pre>
<p class="info">Manually plotting fonts and text is very tedious! It's much easier to use the font printing functions within the MicroView library. Displaying text in MicroView is as simple as:</p>
<pre><code>uView.print("Hello");
</code></pre>
<p>Although MicroView’s library includes 4 different types of font, these fonts might not suit every user’s need. By following these steps you can make your own fonts and include them within the MicroView library:</p>
<ol>
<li>Convert fonts to bitmap.</li>
<li>Generate font source file from bitmap.</li>
<li>Add font source file to MicroView library.</li>
</ol>
<h1 id="converting-fonts-to-bitmap">Converting Fonts to Bitmap</h1>
<p>Once we understand how a character is being mapped to the MicroView’s screen buffer, we can choose to manually draw the font we like to the screen buffer or we can use a converter to convert computer’s font to bitmap and then convert the bitmap into <code>C char</code> definition used by the MicroView library.</p>
<p>We have had good results using <a href="http://www.codehead.co.uk/cbfg">Codehead’s Bitmap Font Generator</a> to convert a font into a bitmap. If you have had success in using other tools, please let us know and we’ll update this article.</p>
<p><img src="/images/Codehead_Bitmap_Font_Generator.png" alt="MicroView Custom Font - Codehead Bitmap Font Generator" /></p>
<p>Let’s quickly run through a few simple steps to convert a Computer’s font into a bitmap. Assuming we need the numbers 0 to 9 of the Courier font in 12x24 pixels, the following steps will generate the required bitmap:</p>
<ol>
<li>Select “Courier” from the Font Details drop down combo box.</li>
<li>Enter 48 as the Cell Height</li>
<li>Enter 12 as the Cell Width</li>
<li>Enter 128 x 32 as the Image Size (this Image Size need to be larger than 12x24x10(number of characters))</li>
<li>Enter 48 as the Start Character ( 48 ASCII code is the number 0)</li>
<li>Enter 200% as the Zoom</li>
</ol>
<p><img src="/images/Codehead_To_Much_Space.png" alt="MicroView Custom Font - Codehead To Much Space" /></p>
<p>From the generated result, it is clear that there is too much space on the left of the numbers and the glyphs are not taking full advantage of the 12x48 cells.</p>
<p>Let’s further enhance the effect of the font:</p>
<ul>
<li>Enter or slowly increase Font Height to a suitable value, in this case, 26</li>
<li>Adjust the Position (X,Y) using the arrow button with option “Adjust All” selected (in this case, X=-4, Y=-1)</li>
</ul>
<p>After the adjustment, we should see the following result:</p>
<p><img src="/images/Codehead_Center_Cell.png" alt="MicroView Font Hack - Codehead Center Cell" /></p>
<p>This result is almost perfect except there is still empty space on the right of the 9 glyph, and at the bottom of all the numbers. We can’t correct this space further because Codehead Font Generator does not allow for a custom image size, so we will correct this with an image editor later.</p>
<p>Click File, then Export Bitmap (BMP), save the file as <code>12x24Font.bmp</code></p>
<p>Using an image editor like Photoshop or GIMP, open the <code>12x24Font.bmp</code> file, then make a selection to crop a 120 x 24 frame from the image.</p>
<p><img src="/images/Codehead_Crop.png" alt="MicroView Custom Font - Codehead Crop" /></p>
<p>If you want a <code>WHITE</code> text on <code>BLACK</code> background, you will need to <code>INVERT</code> the color now. </p>
<p>Save the image and then proceed to next step. You can also save the hassle by downloading the <a href="/images/12x24Font.bmp">12x24Font.bmp</a> already prepared by us.</p>
<p class="success">You have now successfully created a customised bitmap font.</p>
<h1 id="generating-font-source-file-from-bitmap">Generating Font Source File from Bitmap</h1>
<p>In order to convert the font from bitmap to <code>C char</code> definition, we will be using <a href="http://en.radzio.dxp.pl/bitmap_converter">LCD Assistant</a> for this job. Run LCD Assistant and load the <code>12x24Font.bmp</code> file previously saved.</p>
<p><img src="/images/LCD_Assistant.png" alt="Using LCD Assistant to convert font for MicroView" /></p>
<p>Make sure that following options are correct:</p>
<ul>
<li>Picture preview is the right bitmap</li>
<li>Byte orientation has Vertical selected</li>
<li>Width is 120 and Height is 24</li>
<li>Include size not selected</li>
<li>Size endianness has Little selected</li>
<li>Pixels/byte is 8</li>
<li>Table name is 12x14Font (can be any name)</li>
</ul>
<p>Once all the options are correctly selected, click File, then save the output and type in the filename as <code>12x24Font.h</code></p>
<p>Using a text file editor, open <code>12x24Font.h</code></p>
<p>Locate</p>
<pre><code>const unsigned char 12x24Font [] = {
</code></pre>
<p>and replace with</p>
<pre><code>#ifndef FONT12X24_H
#define FONT12X24_H
#include &lt;avr/pgmspace.h&gt;
static const unsigned char font12x24 [] PROGMEM = {
// first row defines - FONTWIDTH, FONTHEIGHT, ASCII START CHAR, TOTAL CHARACTERS, FONT MAP WIDTH HIGH, FONT MAP WIDTH LOW (2,56 meaning 256)
12,24,48,10,1,20,
</code></pre>
<p>Then replace</p>
<pre><code>};
</code></pre>
<p>with</p>
<pre><code>};
#endif
</code></pre>
<p>You should get the following result:</p>
<pre><code>//------------------------------------------------------------------------------
// File generated by LCD Assistant
// http://en.radzio.dxp.pl/bitmap_converter/
//------------------------------------------------------------------------------
#ifndef FONT12X24_H
#define FONT12X24_H
#include &lt;avr/pgmspace.h&gt;
static const unsigned char font12x24 [] PROGMEM = {
// first row defines - FONTWIDTH, FONTHEIGHT, ASCII START CHAR, TOTAL CHARACTERS, FONT MAP WIDTH HIGH, FONT MAP WIDTH LOW (2,56 meaning 256)
12,24,48,10,1,20,
0x1F, 0x1F, 0xE7, 0xE7, 0xE7, 0xE7, 0xE7, 0xE7, 0x1F, 0x1F, 0xFF, 0xFF, 0x9F, 0x9F, 0x9F, 0x9F,
0x07, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0x9F, 0xE7, 0xE7, 0xE7, 0xE7, 0xE7, 0xE7,
0x1F, 0x1F, 0xFF, 0xFF, 0x9F, 0x9F, 0xE7, 0xE7, 0xE7, 0xE7, 0xE7, 0xE7, 0x1F, 0x1F, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x1F, 0x07, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x07, 0xE7, 0xE7,
0xE7, 0xE7, 0xE7, 0xE7, 0xE7, 0xE7, 0xFF, 0xFF, 0x7F, 0x7F, 0x9F, 0x9F, 0xE7, 0xE7, 0xE7, 0xE7,
0xFF, 0xFF, 0xFF, 0xFF, 0x87, 0x87, 0xE7, 0xE7, 0xE7, 0xE7, 0xE7, 0xE7, 0x07, 0x07, 0xFF, 0xFF,
0x1F, 0x1F, 0xE7, 0xE7, 0xE7, 0xE7, 0xE7, 0xE7, 0x1F, 0x1F, 0xFF, 0xFF, 0x1F, 0x1F, 0xE7, 0xE7,
0xE7, 0xE7, 0xE7, 0xE7, 0x1F, 0x1F, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0x7F, 0x7F, 0x9F, 0x9F, 0xE7, 0xE7, 0xF8, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xE7, 0xE7, 0xE7, 0xE7, 0x18, 0x18, 0xFF, 0xFF, 0x1F, 0x1F, 0x61, 0x61, 0x7E, 0x7E, 0x00, 0x00,
0x7F, 0x7F, 0xFF, 0xFF, 0xE0, 0xE0, 0xE7, 0xE7, 0xE7, 0xE7, 0xE7, 0xE7, 0x1F, 0x1F, 0xFF, 0xFF,
0x00, 0x00, 0xE7, 0xE7, 0xE7, 0xE7, 0xE7, 0xE7, 0x1F, 0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x1F, 0x1F, 0xE1, 0xE1, 0xFE, 0xFE, 0xFF, 0xFF, 0x18, 0x18, 0xE7, 0xE7, 0xE7, 0xE7, 0xE7, 0xE7,
0x18, 0x18, 0xFF, 0xFF, 0xF8, 0xF8, 0xE7, 0xE7, 0xE7, 0xE7, 0xE7, 0xE7, 0x00, 0x00, 0xFF, 0xFF,
0xF8, 0xF8, 0xE7, 0xE7, 0xE7, 0xE7, 0xE7, 0xE7, 0xF8, 0xF8, 0xFF, 0xFF, 0xE7, 0xE7, 0xE7, 0xE7,
0xE0, 0xE0, 0xE7, 0xE7, 0xE7, 0xE7, 0xFF, 0xFF, 0xE1, 0xE1, 0xE6, 0xE6, 0xE7, 0xE7, 0xE7, 0xE7,
0xE7, 0xE7, 0xFF, 0xFF, 0xF9, 0xF9, 0xE7, 0xE7, 0xE7, 0xE7, 0xE7, 0xE7, 0xF8, 0xF8, 0xFF, 0xFF,
0xFE, 0xFE, 0xFE, 0xFE, 0xE6, 0xE6, 0xE0, 0xE0, 0xE6, 0xE6, 0xFF, 0xFF, 0xF9, 0xF9, 0xE7, 0xE7,
0xE7, 0xE7, 0xE7, 0xE7, 0xF8, 0xF8, 0xFF, 0xFF, 0xF8, 0xF8, 0xE7, 0xE7, 0xE7, 0xE7, 0xE7, 0xE7,
0xF8, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0xE1, 0xFE, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xF8, 0xF8, 0xE7, 0xE7, 0xE7, 0xE7, 0xE7, 0xE7, 0xF8, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0xE7,
0xE7, 0xE7, 0xF9, 0xF9, 0xFE, 0xFE, 0xFF, 0xFF,
};
#endif
</code></pre>
<p class="success">You have now successfully converted the bitmap font to a C header file.</p>
<h1 id="adding-font-source-file-to-microview-library">Adding Font Source File to MicroView Library</h1>
<p>Move the edited <code>12x24Font.h</code> file to MicroView’s library folder. You should be able to see the <code>12x24Font.h</code> in the same folder as the rest of the MicroView’s files.</p>
<p><img src="/images/Move_Font_To_Library.png" alt="MicroView Save Custom Font To Library" /></p>
<p>Using a text file editor, open <code>MicroView.cpp</code> and perform the following steps:</p>
<p>Locate</p>
<pre><code>// Add header of the fonts here. Remove as many as possible to conserve FLASH memory.
</code></pre>
<p>Add after this line</p>
<pre><code>#include &lt;12x24Font.h&gt;
</code></pre>
<p>Locate</p>
<pre><code>// Change the total fonts included
#define TOTALFONTS 7
</code></pre>
<p>Change to </p>
<pre><code>// Change the total fonts included
#define TOTALFONTS 8
</code></pre>
<p>Locate</p>
<pre><code>const unsigned char *MicroView::fontsPointer[]={
font5x7
,font8x16
,sevensegment
,fontlargenumber
,space01
,space02
,space03
};
</code></pre>
<p>Change to</p>
<pre><code>const unsigned char *MicroView::fontsPointer[]={
font5x7
,font8x16
,sevensegment
,fontlargenumber
,space01
,space02
,space03
,font12x24
};
</code></pre>
<p>The font that we have just added is at the 7th position starting from position 0 (font5x7) in the <code>MicroView::fontsPointer</code> array, therefore the new font is now fontType 7. Save <code>MicroView.cpp</code> once you have made your changes.</p>
<p>Run the following sketch to test your new font:</p>
<pre><code>#include &lt;MicroView.h&gt;
void setup() {
uView.begin();
uView.clear(PAGE);
uView.setFontType(7);
uView.print("1234");
uView.display();
}
void loop () {
}
</code></pre>
<p class="success">You have now successfully hacked MicroView's library to add your own custom font.</p>
</content>
</entry>
<entry>
<title>General Overview of MicroView</title>
<link href="http://learn.microview.io/intro/general-overview-of-microview.html"/>
<updated>2014-06-04T00:00:00+10:00</updated>
<id>http://learn.microview.io/intro/general-overview-of-microview</id>
<content type="html"><p><img src="/images/MicroView_Hero.jpg" alt="MicroView Image" /></p>
<p>The MicroView is the first chip-sized Arduino compatible that lets you see what your Arduino is thinking by using a built-in OLED display. In the heart of MicroView there is an ATMEL’s ATmega328P, 5V &amp; 3.3V LDO and a 64x48 pixel OLED display, together with other passive components that allow the MicroView to operate without any external components other than a power supply.</p>
<p class="info">MicroView is 100% code compatible with Arduino Uno (ATmega328P version), meaning the code that runs on an Arduino Uno will also be able to run on the MicroView if the IO pins used in the code are externally exposed on the MicroView.</p>
<h1 id="hardware-specifications">Hardware Specifications</h1>
<ul>
<li>Display : 64x48 OLED Display</li>
<li>Microcontroller : ATmega328P </li>
<li>Operating Voltage : 5V</li>
<li>Input Voltage : 3.3VDC - 16VDC</li>
<li>Digital I/O Pins : 12 (of which 3 provide PWM output)</li>
<li>Analog Input Pins : 6</li>
<li>Flash Memory : 32 KB</li>
<li>SRAM : 2 KB</li>
<li>EEPROM : 1 Kilobyte</li>
<li>Clock Speed : 16 Mhz</li>
<li>No other components required</li>
</ul>
<h1 id="pin-configuration">Pin Configuration</h1>
<p><img src="/images/MicroView_pinout.png" alt="MicroView pinout" /></p>
<h1 id="oled-memory-map">OLED Memory Map</h1>
<p>The <a href="http://www.solomon-systech.com/en/product/display-ic/oled-driver-controller/ssd1306/">SSD1306</a> is the controller built into the MicroView’s OLED display. It has flexible yet complex segment and common drivers. One requires vast knowledge on memory addressing in order to use the SSD1306 controller.</p>
<p>MicroView’s library was written to hide away the complexities of the SSD1306 controller, so that users can issue simple commands to control the display. Although the SSD1306 has a built-in RAM (memory) for the screen, when connected using the SPI method, the ATmega328P is not able to read the RAM (memory) of the SSD1306. Therefore the software will not be able to manipulate the screen buffer to perform mathematical operations.</p>
<p>MicroView’s library overcomes this by allocating 384 bytes ( (64 x 48)/8 bits) of memory from ATmega328P as buffer. The library can now manipulate the screen buffer and then perform a bulk transfer from the ATmega328P’s memory to the internal memory of the SSD1306 controller.</p>
<p>The 384 bytes of screen buffer are declared in MicroView’s library as</p>
<pre><code>static uint8_t screenmemory [] = {.total 384 bytes of data..};
</code></pre>
<p>and are arranged in a linear form representing the following 64 x 48 pixels coordinate system.</p>
<p><img src="/images/MicroView_Coordinates.png" alt="MicroView Screen Coordinate System" /></p>
<p>Based on the above illustration, for example, if a user wish to plot a pixel at the position of the black dot, where X=10 and Y=2, the would user issue the following command:</p>
<pre><code>uView.pixel(10,2);
</code></pre>
<p>This command will then calculate the exact location of the screen buffer and set a BIT in the corresponding BYTE to the X,Y position.</p>
<p><img src="/images/MicroView_MemoryMap.png" alt="MicroView Screen Memory Map" />
<em>Diagram showing how a linear screen buffer in the ATmega328P aligns with the OLED pixels.</em></p>
<p><img src="/images/MicroView_DataBits.png" alt="MicroView Screen Data Bits" />
<em>Diagram showing the BITs in a BYTE of the screen buffer corresponding to the OLED’s X,Y position.</em></p>
<p>Based on the above illustration, a pixel turned on at X=2 and Y=3 means BYTE 2 of the screen buffer has data of 0x08 (hex). </p>
<p>Two pixels at X=2,Y=3 and X=2,Y=2 turned on means BYTE 2 of the screen buffer has data of 0x0c (hex).</p>
<p>To draw a straight line of 5 pixels starting from 10,2 to 10,6 , the following C code show a pixel by pixel way on how to accomplish this:</p>
<pre><code>uView.pixel(10,2);
uView.pixel(10,3);
uView.pixel(10,4);
uView.pixel(10,5);
uView.pixel(10,6);
</code></pre>
<p>the MicroView library allows you to draw lines by specifying the the start and end coordinates. The above line could be drawn with this simple one line command:</p>
<pre><code>uView.line(10,2,10,6);
</code></pre>
<p>In order for the library to perform extremely fast mathematical operations on the screen buffer (more than 100 frames per second), calls to the drawing functions within the MicroView library does not immediately transfer the contents of screen buffer to the SSD1306 controller. A <code>display()</code> command is required to instruct the library to perform the bulk transfer from the screen buffer to the SSD1306 controller:</p>
<pre><code>uView.display();
</code></pre>
<p>This function takes the whole screen buffer in the ATmega328P and transfers it (via SPI bus, programmed at 8Mhz) to the internal memory of the SSD1306. As soon as the memory is being transferred, the pixels corresponding to the screen buffer will show up on the OLED display.</p>
</content>
</entry>
<entry>
<title>Getting Started with MicroView</title>
<link href="http://learn.microview.io/intro/getting-started.html"/>
<updated>2014-05-04T00:00:00+10:00</updated>
<id>http://learn.microview.io/intro/getting-started</id>
<content type="html"><p>In order to get your MicroView up and running, there are four easy steps to follow: </p>
<ol>
<li>Install drivers.</li>
<li>Prepare MicroView for programming</li>
<li>Choose Arduino software</li>
<li>Write your first sketch</li>
</ol>
<h1 id="step-1---install-drivers">STEP 1 - Install Drivers</h1>
<p>MicroView, like the Arduino, relies on a programmer to upload sketches (Arduino code) and also communicate with the computer. This programmer often has a USB to TTL converter chip that creates a Virtual Serial Port on the computer when properly installed. MicroView’s <a href="https://www.sparkfun.com/products/12924">factory USB Programmer</a> uses the <a href="http://www.ftdichip.com/Products/ICs/FT231X.html">FTDI’s FT231X</a> to send the sketches to MicroView and also act as a communication medium between MicroView and computer.</p>
<p>Depending on the OS (Operating System) of your computer, the drivers are installed using different methods. Below are the installation instructions prepared by SparkFun Electronics:</p>
<ul>
<li><a href="https://learn.sparkfun.com/tutorials/how-to-install-ftdi-drivers/windows---quick-and-easy">How to Install FTDI Drivers for Windows</a></li>
<li><a href="https://learn.sparkfun.com/tutorials/how-to-install-ftdi-drivers/linux">How to Install FTDI Drivers for Linux</a></li>
<li><a href="https://learn.sparkfun.com/tutorials/how-to-install-ftdi-drivers/mac">How to Intall FTDI Drivers for Mac</a></li>
</ul>
<h1 id="step-2---prepare-microview-for-programming">STEP 2 - Prepare MicroView for Programming</h1>
<p>Once you have finished the FTDI Drivers installation, you will need to prepare the MicroView to be inserted into the computer’s USB port.</p>
<p>If you have purchased the <a href="https://www.sparkfun.com/products/12924">factory USB Programmer</a>, just insert the MicroView into the USB Programmer following the photo below. Please take note that at the back of MicroView, there is a round dot marking showing the Pin 1 of the MicroView where you need to match the Pin 1 of the USB Programmer.</p>
<p><img src="/images/MicroView_Factory_Programmer.jpg" alt="MicroView Factory USB Programmer" /></p>
<p>Once you have inserted the MicroView into the USB Programmer, you can now insert the USB Programmer into the USB port of the computer as below. If your computer does not have a right-sided USB port, please use a <a href="https://www.sparkfun.com/products/517">USB Cable Extension</a> to extend the USB port to the front so that you can easily work with the MicroView.</p>
<p><img src="/images/MicroView_Programmer_To_Computer.jpg" alt="MicroView USB Programmer Connects to Computer" /></p>
<p>If you have not purchase the factory USB Programmer and have <a href="https://www.sparkfun.com/products/9716">FTDI Basic Breakout -5V</a> or <a href="https://www.sparkfun.com/products/9718">FTDI Cable 5V</a> lying around, they can also be used as a MicroView programmer. Connect the FTDI Basic Breakout board as below, and you are ready to go.</p>
<p><img src="/images/MicroView_FTDI_Programmer.svg" width="700" title="MicroView FTDI Basic Programmer Connection" /></p>
<p class="success">You have now successfully prepared the MicroView for programming.</p>
<h1 id="step-3---choose-the-right-arduino-software-ide">STEP 3 - Choose the Right Arduino Software (IDE)</h1>
<p>There are currently two options when selecting the Arduino Sofware (IDE). The first option is to use the cloud based <a href="https://codebender.cc">Codebender</a> and the second option is to use <a href="http://arduino.cc/en/main/software">Arduino IDE.</a></p>
<p class="info">As our Learning Kit's tutorials are based on Codebender, and Codebender has already included MicroView's library in their cloud solution, we highly recommend users to use Codebender for our tutorials.</p>
<h2 id="using-codebender">Using Codebender</h2>
<p>Installing Codebender is really simple, the prerequisite is just Chrome or Firefox browser. Using Chrome or Firefox, browse to <a href="https://codebender.cc/static/walkthrough/page/1">Codebender’s Getting Started page</a> and then follow the steps below (shown using Firefox browser).</p>
<p><img src="/images/Codebender_Step01.png" alt="MicroView install Codebender Step 1" /></p>
<p>Click <code>Let's Go!</code></p>
<p><img src="/images/Codebender_Step02.png" alt="MicroView install Codebender Step 2" /></p>
<p>Click <code>Add to Firefox.</code></p>
<p><img src="/images/Codebender_Step03.png" alt="MicroView install Codebender Step 3" /></p>
<p>Click <code>Allow</code> when you see the message “Firefox prevented this site (codebender.cc) from asking you to install software on your computer.”</p>
<p><img src="/images/Codebender_Step04.png" alt="MicroView install Codebender Step 4" /></p>
<p>Wait for the <code>Add-on downloading</code> to finish.</p>
<p><img src="/images/Codebender_Step05.png" alt="MicroView install Codebender Step 5" /></p>
<p>Click <code>Install Now</code></p>
<p><img src="/images/Codebender_Step06.png" alt="MicroView install Codebender Step 6" /></p>
<p>Click <code>Restart Now</code> when you see the message “Codebender.cc Plugin will be installed after you restart Firefox.”</p>
<p class="success">You have now successfully installed Codebender on your browser. Please proceed to STEP 4 – Write Your First Sketch</p>
<h2 id="install-arduino-ide">Install Arduino IDE</h2>
<p>Installing Arduino IDE is normally straight forward, however it is still a bit challenging if one has never try before. Luckily our partner SparkFun have already published step by step guides on:</p>
<ul>
<li><a href="https://learn.sparkfun.com/tutorials/installing-arduino-ide/windows">Installing Arduino IDE for Windows</a></li>
<li><a href="https://learn.sparkfun.com/tutorials/installing-arduino-ide/mac">Installing Arduino IDE for Mac</a></li>
<li><a href="https://learn.sparkfun.com/tutorials/installing-arduino-ide/linux">Installing Arduino IDE for Linux</a></li>
</ul>
<p class="info">After installation of the Arduino IDE has completed, unlike Codebender, you will still need to install MicroView's library.</p>
<h3 id="install-microview-library">Install MicroView Library</h3>
<p>Download MicroView’s library from our github repo below:</p>
<p><a href="https://github.com/geekammo/MicroView-Arduino-Library/archive/master.zip">MicroView Library Github Repo</a></p>
<p>Save the ZIP file to your download folder then unzip the ZIP file. Rename the folder name from <code>MicroView-Arduino-Library-master</code> to <code>MicroView</code>.</p>
<p><img src="/images/MicroView_Rename_Library_Folder.png" alt="MicroView Rename Library Folder" /></p>
<p>Execute Arduino IDE, click Sketch, Import Library and then Add Library.</p>
<p><img src="/images/MicroView_Add_Library.png" alt="Add MicroView Library to Arduino IDE" /></p>
<p>Browse to the <code>MicroView</code> folder that was renamed and select that folder. MicroView library will be automatically installed.</p>
<p>Click File, Example, and find MicroView Example to confirm the installation.</p>
<p><img src="/images/MicroView_Library_Installed.png" alt="MicroView Library Installed" /></p>
<h1 id="step-4---write-your-first-sketch">STEP 4 - Write Your First Sketch</h1>
<pre><code>#include &lt;MicroView.h&gt;
void setup() {
uView.begin();
uView.clear(PAGE);
uView.print("HelloWorld");
uView.display();
}
void loop () {
}
</code></pre>
<p class="success">Well done! You are now ready to try our other tutorials.</p>
</content>
</entry>
</feed>