用户
 找回密码
 立即注册

QQ登录

只需一步,快速开始

点击进入授权页面

只需一步,快速开始

  • QQ空间
  • 回复
  • 收藏
  • TA的每日心情
    慵懒
    2017-7-16 11:47
  • 签到天数: 44 天

    [LV.5]常住居民I

    奈何col 攻城狮 2017-2-8 22:14 楼主
    取模软件好多,选择困难症又犯了,为了自救,所以自己做了个
    工具地址:
    http://tools.clz.me/

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



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

    适用驱动库:u8glib、u8g2等Arduino图形显示设备驱动库。
    适用设备:
    OpenJumper 12864 OLEDOpenJumper MINI12864 LCD(欢迎大家用自己的设备测试,可行的话回复下,我补上)

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

    u8g2测试代码:
    [C++] 纯文本查看 复制代码
    /*
    使用u8g2显示数据
    图形显示器:OpenJumper 12864 OLED
    设备核心:SSD1306
    */
    
    #include <U8g2lib.h>
    
    #define rst  2
    U8G2_SSD1306_128X64_NONAME_F_HW_I2C  u8g2(U8G2_R0 , rst);
    
    //取模得到的数组
    //width:55,height:64 
    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};
    
    void setup(void) {
      u8g2.begin();
    }
    
    void loop(void) {
      u8g2.clearBuffer();           // 清空显示设备内部缓冲区
      u8g2.drawXBMP( 0 , 0 , 55 , 64 , col );     //50,50为图片尺寸,根据你的图片尺寸修改
      u8g2.sendBuffer();         // 显示缓冲区内容
      delay(1000);  
    }
    
    QQ截图20180319181749.jpg
    QQ截图20170208235634.jpg QQ截图20170210182912.jpg
    如果以上内容对你有帮助,你可以通过打赏支持作者

    1人打赏

    不错,收藏了
    随便赏个1块大洋吧
    那么我试试 少见的,SH1106 试试
    随便赏个1块大洋吧
    本帖最后由 sun910231 于 2017-2-9 09:14 编辑

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

    使用12864B V2 LCD    st7920芯片~
    打赏一点,努力一点
    哎。。玩arduino好费钱啊。。47.04。。

    点评

    自己买同芯片的便宜的显示屏啊  详情 回复 发表于 2017-2-9 15:04
    打赏作者鼓励一下!
    .oο麽麽茶㊣ 发表于 2017-2-9 09:45
    哎。。玩arduino好费钱啊。。47.04。。

    自己买同芯片的便宜的显示屏啊
    如果以上内容对你有帮助,你可以通过打赏支持作者
    厉害啊,晚上回去试试!
    打赏作者鼓励一下!
    厉害厉害                             
    NOKIA  5110 屏幕测试成功;
    8448  屏   驱动 PCD8544  SPI U8G库文件;
    5110.jpg
    打赏一点,努力一点
    12345下一页
    发新帖
    发表评论
    高级模式  
    您需要登录后才可以回帖 登录 | 立即注册  
    关闭

    推荐主题 上一条 /2 下一条