Avatar for CMSpooner

CMSpooner

Member since Feb 2018 • Last active Jun 2023
  • 0 conversations
  • 16 comments

High School Programming, Electronics, and CD Printing Teacher

Most recent activity

  • in ESP8266
    Avatar for CMSpooner

    That makes a lot of sense! I pulled from github and wanted to make sure I had the most recent version of the IDE and couldn't remember which save on send I had. Thanks for the great support. I can't wait to have the kids at STEM camp playing with these!

  • in ESP8266
    Avatar for CMSpooner

    So I was starting to have some problems uploading code. Code looked like it went over; but it wasn't changing. I ran the following code:

    >s = require("Storage")
    =function () { [native code] }
    >s.eraseAll()
    =undefined
    

    And then re-loaded my code over usb and no more memory errors. I am wondering if it is not cleaning itself out properly between loads with the newest version of the IDE (pulled from Git today)

  • in ESP8266
    Avatar for CMSpooner

    That definitely helped with ram usage:

    >process.memory()
    ={ "free": 833, "usage": 767, "total": 1600, "history": 7,
      "gc": 571, "gctime": 2.573 }
    

    I was able to load the unminimized code (it previously failed to load where different levels of minimization would load; so i've been using it to test. I still get a message:

     ____                 _
    |  __|___ ___ ___ _ _|_|___ ___
    |  __|_ -| . |  _| | | |   | . |
    |____|___|  _|_| |___|_|_|_|___|
             |_| espruino.com
     1v96.5 (c) 2018 G.Williams
    Espruino is Open Source. Our work is supported
    only by sales of official boards and donations:
    http://espruino.com/Donate
    Flash map 4MB:1024/1024, manuf 0xc8 chip 0x4016
    >
    =undefined
    Loading 14495 bytes from flash...
    Execution Interrupted during event processing.
    New interpreter error: LOW_MEMORY,MEMORY
    

    But the code is loaded and stored.

  • in ESP8266
    Avatar for CMSpooner

    Interesting...Saving the image to flash is definitely something that would be easy. I'm not sure if I want to build a custom image; since I would then have to keep parity with the official branch after I distribute them to the kids.

  • in ESP8266
    Avatar for CMSpooner

    I'll try that.

    Here is the response from my device on load:

     ____                 _
    |  __|___ ___ ___ _ _|_|___ ___
    |  __|_ -| . |  _| | | |   | . |
    |____|___|  _|_| |___|_|_|_|___|
             |_| espruino.com
     1v96.5 (c) 2018 G.Williams
    Espruino is Open Source. Our work is supported
    only by sales of official boards and donations:
    http://espruino.com/Donate
    Flash map 4MB:1024/1024, manuf 0xc8 chip 0x4016
    >
    =undefined
    Loading 14495 bytes from flash...
    Execution Interrupted during event processing.
    New interpreter error: LOW_MEMORY,MEMORY
    

    On Boot:

    >process.memory()
    ={ "free": 603, "usage": 997, "total": 1600, "history": 1,
      "gc": 485, "gctime": 2.459 }
    

    On connect to wifi:

    >process.memory()
    ={ "free": 624, "usage": 976, "total": 1600, "history": 4,
      "gc": 73, "gctime": 2.527 }
    >process.memory()
    

    On start of ball bounce demo:

    ={ "free": 611, "usage": 989, "total": 1600, "history": 4,
      "gc": 146, "gctime": 2.581 }
    > 
    
  • in ESP8266
    Avatar for CMSpooner

    I'm using this ESP8266_4MB board with battery and oled screen . I am able to install my codebase with basic minification on, but get Low memory messages. I guess I will have to optimise a bit.

    I plan to give these out at my schools summer STEM camp. Bought in bulk we can get it to around $10 a student with a battery and 3d print the case. I am writing a comprehensive demo to show them what they can do. It also makes sure I understand the platform; so I can answer questions. I just picked up JavaScript recently (Fitbit Ionic Development), so I am still getting comfortable with the language. I'll attach my demo so far.

  • in ESP8266
    Avatar for CMSpooner

    Thanks! That seems to have done the trick!...I'm not sure how much more stuff I can stuff into it; but I should be able to finish a nice demo program that shows the capabilities of this board.

  • in ESP8266
    Avatar for CMSpooner

    I saw that...I was hoping for an example of saving an entire javascript program into storage and then loading it and executing it. Would I create a helper program to save the .js file as a really long string then onInit() read it back out and then somehow execute the string as Javascript?

    Edit: I think I'm on the same page as you now....I will try playing with that tonight.

  • in ESP8266
    Avatar for CMSpooner

    Excellent! Is there anyway you could link to the example? I did a little searching but didn't see how to write executable code using the .write() command

  • in ESP8266
    Avatar for CMSpooner

    So is there a way to get around the 10k source code size limit?

Actions