OLED/LCD/12864 WEB在线图片取模工具beta-Arduino中文社区 - Powered by Discuz!
查看: 116790|回复: 106

OLED/LCD/12864 WEB在线图片取模工具beta

  [复制链接]

该用户从未签到

发表于 2017-2-8 22:14 | 显示全部楼层 |阅读模式
取模软件好多,选择困难症又犯了,为了自救,所以自己做了个
工具地址:
http://tools.clz.me/

源代码:
https://github.com/coloz/image-to-bitmap-array



使用方法:
1.准备一张图片,图片分辨率应小于你的显示设备
2.在网页中上传图片
3.复制生成的代码到你的程序中

适用驱动库:u8glib、u8g2等Arduino图形显示设备驱动库。
适用设备: 几乎所有单色点阵屏


相关问题和建议,可以回帖提出

u8g2测试代码:

  1. /*
  2. 使用u8g2显示数据
  3. 图形显示器:OpenJumper 12864 OLED
  4. 设备核心:SSD1306
  5. */

  6. #include <U8g2lib.h>

  7. #define rst  2
  8. U8G2_SSD1306_128X64_NONAME_F_HW_I2C  u8g2(U8G2_R0 , rst);

  9. //取模得到的数组
  10. //width:55,height:64
  11. const unsigned char col[] U8X8_PROGMEM= {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0x03,0x00,0x00,0x00,0x00,0xfc,0xff,0x3f,0x00,0x00,0x00,0x00,0x3f,0x00,0xfc,0x00,0x00,0x00,0xc0,0x03,0x00,0xe0,0x03,0x00,0x00,0xf0,0x00,0x00,0x00,0x0f,0x00,0x00,0x38,0x00,0x00,0x00,0x1c,0x00,0x00,0x0e,0x00,0x00,0x00,0x78,0x00,0x00,0x07,0x00,0x00,0x00,0x60,0x00,0x80,0x03,0x00,0x00,0x00,0xc0,0x00,0xc0,0x01,0x00,0x00,0x00,0x80,0x03,0xe0,0x00,0x00,0x00,0x00,0x00,0x03,0x60,0x00,0x00,0x00,0x00,0x00,0x07,0x70,0x00,0x00,0x00,0x00,0x00,0x06,0x30,0x00,0x00,0x00,0x00,0x00,0x0c,0x18,0x00,0x00,0x00,0x00,0x00,0x0c,0x18,0x00,0x00,0x00,0x00,0x00,0x18,0x0c,0x10,0x00,0x00,0x04,0x00,0x18,0x0c,0x18,0x00,0x00,0x0c,0x00,0x30,0x06,0x18,0x00,0x00,0x0c,0x00,0x30,0x06,0x18,0x00,0x00,0x0c,0x00,0x30,0x06,0x18,0x00,0x00,0x0c,0x00,0x30,0x06,0x00,0x00,0x00,0x00,0x00,0x60,0x02,0x00,0x00,0x00,0x00,0x00,0x60,0x03,0x00,0x00,0x00,0xe4,0x00,0x60,0x83,0x04,0x0c,0x06,0xa4,0x00,0x60,0x83,0x0d,0x8c,0x07,0x8c,0x00,0x60,0x03,0x0d,0xfc,0x01,0x08,0x00,0x30,0x03,0x01,0x70,0x00,0x00,0x00,0x30,0x03,0x00,0x00,0x00,0x00,0x00,0x30,0x03,0x00,0x00,0x00,0x00,0x00,0x30,0x06,0x00,0x00,0x00,0x00,0x00,0x18,0x06,0x00,0x00,0x00,0x00,0x00,0x18,0x06,0x00,0x00,0x00,0x00,0x00,0x0c,0x0e,0x00,0x00,0x00,0x00,0x00,0x0c,0x0c,0x00,0x00,0x00,0x00,0x00,0x06,0x1c,0x00,0x00,0x00,0x00,0x00,0x03,0x38,0x00,0x00,0x00,0x00,0xc0,0x01,0x70,0x00,0x00,0x00,0x00,0xe0,0x00,0xe0,0x00,0x00,0x00,0x00,0x78,0x00,0xc0,0x07,0x00,0x00,0x00,0x1e,0x00,0x00,0x3f,0x00,0x00,0x80,0x07,0x00,0x00,0x78,0x00,0x00,0xc0,0x03,0x00,0x00,0x60,0x00,0x60,0xc0,0x00,0x00,0x00,0x60,0x02,0x60,0xc0,0x00,0x00,0x00,0x60,0x06,0x60,0xc0,0x00,0x00,0x00,0x60,0x06,0x60,0xc0,0x00,0x00,0x00,0x60,0x06,0x30,0xc0,0x00,0x00,0x00,0x60,0x06,0x30,0xcc,0x00,0x00,0x00,0x60,0x06,0x18,0xcc,0x00,0x00,0x00,0x60,0x06,0x0c,0xcc,0x00,0x00,0x00,0x60,0x06,0x0e,0xc6,0x00,0x00,0x00,0xe0,0x0c,0x06,0x86,0x01,0x00,0x00,0xc0,0x18,0x02,0x83,0x03,0x00,0x00,0xe0,0x19,0xe7,0x01,0x03,0x00,0x00,0xf0,0xdf,0xff,0x00,0x03,0x00,0x00,0x38,0xc4,0x18,0x00,0x02,0x00,0x00,0x18,0x60,0x00,0x00,0x03,0x00,0x00,0x0c,0x60,0x00,0x00,0x03,0x00,0x00,0x0c,0x20,0x00,0xc0,0x01,0x00,0x00,0x18,0x60,0x00,0xe0,0x00,0x00,0x00,0x38,0x70,0x00,0x7c,0x00,0x00,0x00,0xf0,0xff,0xff,0x1f,0x00,0x00,0x00,0xc0,0x8f,0xff,0x03,0x00,0x00};

  12. void setup(void) {
  13.   u8g2.begin();
  14. }

  15. void loop(void) {
  16.   u8g2.clearBuffer();           // 清空显示设备内部缓冲区
  17.   u8g2.drawXBMP( 0 , 0 , 55 , 64 , col );     //50,50为图片尺寸,根据你的图片尺寸修改
  18.   u8g2.sendBuffer();         // 显示缓冲区内容
  19.   delay(1000);  
  20. }
复制代码



QQ截图20180319181749.jpg
QQ截图20170208235634.jpg QQ截图20170210182912.jpg

该用户从未签到

发表于 2018-3-14 12:24 | 显示全部楼层
求12864 st7920屏的测试程序,谢谢

该用户从未签到

发表于 2017-2-9 09:45 | 显示全部楼层
哎。。玩arduino好费钱啊。。47.04。。

点评

自己买同芯片的便宜的显示屏啊  详情 回复 发表于 2017-2-9 15:04

该用户从未签到

发表于 2017-2-8 22:57 | 显示全部楼层
不错,收藏了

该用户从未签到

发表于 2017-2-8 23:05 | 显示全部楼层
那么我试试 少见的,SH1106 试试

该用户从未签到

发表于 2017-2-9 09:09 | 显示全部楼层
本帖最后由 sun910231 于 2017-2-9 09:14 编辑

可以,还不错,不用太多设置,直接出代码:
test.jpg tes2.jpg

使用12864B V2 LCD    st7920芯片~

该用户从未签到

 楼主| 发表于 2017-2-9 15:04 | 显示全部楼层
.oο麽麽茶㊣ 发表于 2017-2-9 09:45
哎。。玩arduino好费钱啊。。47.04。。

自己买同芯片的便宜的显示屏啊

该用户从未签到

发表于 2017-2-10 17:18 | 显示全部楼层
厉害啊,晚上回去试试!

该用户从未签到

发表于 2017-2-11 09:09 | 显示全部楼层
厉害厉害                             

该用户从未签到

发表于 2017-2-13 10:17 | 显示全部楼层
NOKIA  5110 屏幕测试成功;
8448  屏   驱动 PCD8544  SPI U8G库文件;
5110.jpg
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

热门推荐

arduino 2560串口无法通信问题
arduino 2560串口无法通信
这样将2560主板和蓝牙模块连接到一起进行通信,结果arduino2560可以通过电脑给蓝牙模
求助各位大佬,proteus8软件为什么搜不到uno板子
求助各位大佬,proteus8软
求各位大佬帮忙看看,小白第一次用就出了这个,泪了
【Arduino】168种传感器系列实验(171)---HLK-V20离线语音模块
【Arduino】168种传感器系
37款传感器与模块的提法,在网络上广泛流传,其实Arduino能够兼容的传感器模块肯定是
esp8266网页配置wifi 及Blinker秘钥,实现远程开灯
esp8266网页配置wifi 及Bl
经过一段时间的学习借鉴,写了一段可以web配网,配Blinker秘钥的程序,借鉴很多大佬,
【Arduino】168种传感器模块系列实验(144)---0.91寸OLED液晶屏
【Arduino】168种传感器模
37款传感器与模块的提法,在网络上广泛流传,其实Arduino能够兼容的传感器模块肯定是
Copyright   ©2015-2016  Arduino中文社区  Powered by©Discuz!   
快速回复 返回顶部 返回列表