LED模块ASCII 7X5侧喂字符 [英] ASCII 7x5 side-feeding characters for led modules
问题描述
我在看的code这里的字体文件:
http://www.openobject.org/opensourceurbanism/Bike_POV_Beta_4
I am looking at the code for the font file here: http://www.openobject.org/opensourceurbanism/Bike_POV_Beta_4
在code开头是这样的:
The code starts like this:
const byte font[][5] = {
{0x00,0x00,0x00,0x00,0x00}, // 0x20 32
{0x00,0x00,0x6f,0x00,0x00}, // ! 0x21 33
{0x00,0x07,0x00,0x07,0x00}, // " 0x22 34
{0x14,0x7f,0x14,0x7f,0x14}, // # 0x23 35
{0x00,0x07,0x04,0x1e,0x00}, // $ 0x24 36
{0x23,0x13,0x08,0x64,0x62}, // % 0x25 37
{0x36,0x49,0x56,0x20,0x50}, // & 0x26 38
{0x00,0x00,0x07,0x00,0x00}, // ' 0x27 39
{0x00,0x1c,0x22,0x41,0x00}, // ( 0x28 40
{0x00,0x41,0x22,0x1c,0x00}, // ) 0x29 41
{0x14,0x08,0x3e,0x08,0x14}, // * 0x2a 42
{0x08,0x08,0x3e,0x08,0x08}, // + 0x2b 43
等等...
我和这个code是如何工作非常困惑 - 有人可以解释给我吧。
I am very confused as to how this code works - can someone explain it to me please?
谢谢,
迈季
推荐答案
5个字节= 40位,图中的字符网格的7X5 = 35像素,每个像素阵列(有5个未使用的位presumably)。
Each array of 5 bytes = 40 bits which map to the 7x5 = 35 pixels in the character grid (there are 5 unused bits presumably).
当您想显示你复制相应的5个字节的位图该字符到适当的存储位置的字符。例如。显示字符 X
你会从中的数据复制字体['X']
。
When you want to display a character you copy the corresponding 5 byte bitmap for that character to the appropriate memory location. E.g. to display the character X
you would copy the data from font['X']
.
这篇关于LED模块ASCII 7X5侧喂字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!