Avatar for hungryforcodes

hungryforcodes

Member since Mar 2017 • Last active Apr 2021
  • 7 conversations
  • 134 comments

I love Espruino and bacon! :P

Most recent activity

  • in ESP8266
    Avatar for hungryforcodes

    So this is an ESP8266, let's be clear. Has anyone ACTUALLY been able to increase practical RAM in this device using external i2c or SPI modules? The ESP32 certainly has PSRAM, but that Espressif provides this solution suggests RAM expansion itself is not so straight forward as just wiring up modules. For other Espruino Official boards is it possible? Wouldn't there be required some modifications (or at least an i2c driver for example) to Espruino itself to support it?

    Also keep in mind that the original poster said he was "new to this". While uploading individual code modules using Storage is a new and innovative approach to coding in Espruino for sure (and then after say using "eval" to load these modules), it's certainly more complicated.

    That said, I'm certainly looking into it, but it's a new way of thinking I find.

  • in ESP8266
    Avatar for hungryforcodes

    It's just an ancillary note, but there is a function to write out your code to flash directly as opposed to storing it in RAM. It's in the Web IDE -> Settings -> Communications -> Save On Send -> "Direct To Flash".

    You can experiment with that as it might free up some additional JSVars if you were not already using it.

    -hfc

  • in ESP8266
    Avatar for hungryforcodes

    @Ruprect99 I've had this before a few times and it generally seems to point to some flash corruption?

    I find that typing "reset(1) -> save()" (could also be "reset(0)") seems to force some kind of clean up algorithm (flash compacting?). That might resolve it.

    But the sure way to deal with it is just to reflash the firmware. Make sure to use the "erase_flash" option in esptool before doing so though, just to ensure you reformat the entire flash address space.

  • in ESP32
    Avatar for hungryforcodes

    You don't need C to write a display driver for your e-ink display. I had something similar (their 2.13 inch display), but didn't have the chance to to write a proper driver. Unfortunately, because the displays are fragile, it broke in transit during a house move recently.

    https://www.espruino.com/SSD1606

    Gordon has a display driver writen for an SSD1606, it's possible that your display is not too far off and you could adapt it. You'd need to identify the chipset first, then make the modifications.

    Everything else is Javascript, so it's a matter of "converting" thinking in C to thinking in Javascript.

    -=hfc

  • in ESP32
    Avatar for hungryforcodes

    Wow, that's really impressive! I had been thinking of throwing up a github just like that for the TTGO Watch 2020. You've ever got the unbuffered frame buffer modification for the ST7789V. I'll have a deeper look at this. :)

  • in ESP32
    Avatar for hungryforcodes

    Hi.

    Were you aware of:

    ESP32.enableBLE(disable)
    

    ?

    It will disable the BLE functionality on the ESP32. It will also erase all your code. But when you restart the board, it should give you an additional 2K JSVars, so around 4K JSVars total. You can then reflash your program and take advantage of the additional memory space.

    Additionally, if you get a board with PSRAM (4MB or 8MB), it will give you up to another 16K JSVars, which will bring your total up to 20K.

    -hfc

  • in General
    Avatar for hungryforcodes

    Wow, great! I get the pattern now. Thanks for laying it out so clearly -- the changes in github make it really clear. I'll test it out and hopefully you'll see my first module -- one day soon :)

  • in General
    Avatar for hungryforcodes

    Also if you look at his actual code at his link, from my impression its almost exactly like the ILI9163 module. So I'm not sure what I would do exactly to make it submissable -- it SEEMS like a module for me already, and works -- though to be fair, I've never made a module before for Espruino. :)

  • in General
    Avatar for hungryforcodes

    Well its not my work. So I guess we'd have to ask him :)

  • in General
    Avatar for hungryforcodes

    Jorgen did a driver for the ST7735 a while back. Its in this thread:

    http://forum.espruino.com/comments/12347­822/

    You can require the driver directly via https like this:

    
    
    pinMode(D5,"output");
    
    D5.set(); // Backlight On
    
    var colorPalette = new Uint16Array([0, 0xF80F, 0x001F, 0xFFFF]);
    var spi = new SPI();
    spi.setup({mosi:D19 /* sda */, sck:D18 /* scl */});
    
    var g = require("https://espruino.microco.sm/api­/v1/files/a77b4d12f6a3b7587da5a3a70c02dc­13ad2a3332.js").connectPaletted(colorPal­ette, spi, D21 /* DC */, D15 /*CS */, D2 /* RST */, function() {
      g.clear();
      g.setRotation(2);
      g.setColor(1);
      g.drawString("Hello",0,0);
      g.setColor(2);
      g.setFontVector(20);
      g.drawString("TESTING",0,10);
      g.setColor(3);
      g.setFontVector(30);
      g.drawString("TESTING",0,30);
      g.setColor(4);
      g.setFontVector(40);
      g.drawString("TESTING",0,50);
      g.flip();
    });
    
    

    Adjust the pinouts for your setup. I've used it a few times and it seems fine. Gordon was there something you found wrong about it? I noticed it wasn't on the drivers page. Maybe I missed something about it.

    The unit I have is labeled SCL and SDA, but as you can see on some forums thats just how its labelled. It is in fact SPI.

Actions