查看: 153100|回复: 124

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
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

热门推荐

TTGO TFT屏幕Arduino使用的小结
TTGO TFT屏幕Arduino使用
TTGO TFT屏幕是一款ESP32和1.44寸LCD屏幕组合的产品,屏幕由ST7789驱动。ESP32自带520
【求助】ESP8266与天问ASR-ONE 串口通讯无法通讯
【求助】ESP8266与天问ASR
如图所示:天问ASR 的这块语音版的TX接口连接到了ESP8266的RX口上。用安信可的串口助
报错求助
报错求助
请问各位大佬这是怎么回事啊
点灯·blinker-3 天猫精灵接入8266+继电器控制灯
点灯·blinker-3 天猫精灵
继续倒腾,今天试试把“点灯”接入家里的天猫精灵。 参考“点灯”官网教程:ht
arduino解码sbus
arduino解码sbus
市面上有很多sbus接收机,它只有一根线就可以实现很多通道的通信,其本质利用了串口通
Copyright   ©2015-2016  Arduino中文社区  Powered by©Discuz!   
快速回复 返回顶部 返回列表