Graphics on ESP8266

Posted on
  • Hi Everyone,

    Is anyone knows how to display on Max7291?

    I am trying to create a Graphics buffer as mentioned on

    var g = Graphics.createArrayBuffer(8,8,1); // Create graphics

    But getting an "Uncaught Reference" error :(

    Can anyone help?


  • Ok, I figured 1v91 doesn't have Graphics library inbuilt, so I had to use 1v86.171.

    Now, the following example doesn't display "Hi" rather it displays some weird characters on the display. Any idea?

    var SPI2 = new SPI();
    SPI2.setup({mosi:D0, sck:D2});
    var disp = require("MAX7219").connect(SPI2, D3);
    var g = Graphics.createArrayBuffer(8,8,1); // Create graphics
    g.flip = function() { disp.raw(g.buffer); }; // To send to the display
    g.flip(); // update what's on the display
  • or download 1v91 with Graphics 512K or 4MB

  • @MaBe
    I am using esp-01 upgraded version (1MB), Do you have a version which I can flash?


  • you can use the 512K version

  • Thanks, I will give it a try.

    @MaBe, did you see the image? Do you have any idea what is causing this problem?

  • @navas, try changing the baud rate, I think the default is 50,000.

    Try 100,000

  • @navas how will you use in the esp-01 it only has 2 gpio pins?

  • @MaBe, I tried flashing the 512KB version, but it didn't work. Getting continuous message like this


    So I had to revert to the 1v86.171 version. This is the command I have used --port /dev/tty.SLAB_USBtoUART --baud 115200 write_flash   --flash_freq 40m --flash_mode qio --flash_size 8m   0x0000 "boot_v1.6.bin" 0x1000 espruino_esp8266_user1.bin 0xFC000 esp_init_data_default.bin 0x1FC000 blank.bin
  • @Wilberforce, Once you setup the Wifi I can use ESP-01, RX / TX pins. They are simple connected to D3 and D1, please check the following image

  • Hi @navas,

    first erase the flash and then use the flash setting for 512KB listed in README_flash.txt

         _____                 _
    |   __|___ ___ ___ _ _|_|___ ___
    |   __|_ -| . |  _| | | |   | . |
    |_____|___|  _|_| |___|_|_|_|___|
     1v91.2149 Copyright 2016 G.Williams
    Espruino is Open Source. Our work is supported
    only by sales of official boards and donations:
    Flash map 512KB:256/256, manuf 0xe0 chip 0x4016
    WARNING: *** Your flash chip does not match your flash map ***

    you can ignore the warning, but you should seriously think about a donation

  • you can ignore the warning, but you should seriously think about a donation

    I would love too! How do I a do it. I have a paypal account.


  • and click on the donate button - it offers PayPal too

  • @Gordon Just placed an order for pico from official tindie, order # 64437.

    Also donated $5 with paypal. Confirmation number: 8GF29176FL1303242

    I am not making any money using Espruino / ESP8266. I am just a hobbyist. :)

    But I love working with Espruino on my spare time. It makes myself alive. I love this community and thanks for doing this great work!

    Espruino Rocks!

  • @Wilberforce changed the baud rate. No luck yet!

    I guess it is best suitable for numbers and HELP!

  • @navas
    Sorry - I was not clear. Not the connection baud rate, the SPI baud rate to connect to your LCD module:­setup

    SPI2.setup({mosi:D0, sck:D2,baud:100000});
  • @Wilberforce,

    Yes, I did try exactly what you have mentioned, but no luck so far...

  • I think the debug output will use one the D2. You would need to disable both the uart and the debug uart - as the serial output could be upsetting your spi output

  • try this pins

    // NodeMCU ESP8266
    // Native ESP8266
  • He is using an esp-01 so won't have those pins!

  • Sorry - shame .....

  • Nope, tried with ESP-12E as well. Ended up with the same result.

    But thanks for the response, appreciate it.

  • The NodeMcu:Dx notation that @MaBe referenced maps to the PIN numbers as labelled on the board.

    If you use D0 this is gpio0 , and not the PIN label on the board...

    Do you understand what I'm trying to say?

  • Yes, I understand that. I am not using node MCU notation, just plain 12E. Also I see that displaying "--HELP--" and numbers works just fine. But with Graphics I couldn't get it work.

    Thanks for the response.

  • ok . so you can write text and numbers to the display.

    It is not clear what you actual issue is. What graphics are you trying to display?

    If you posted some code, perhaps it would be apparent what you are trying to do?

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview

Graphics on ESP8266

Posted by Avatar for navas @navas