Avatar for JumJum

JumJum

Member since Oct 2013 • Last active May 2017
  • 78 conversations
  • 445 comments

Most recent activity

  • in Projects
    Avatar for JumJum

    The 4x4 set is great, couldn't believe. Its still readable, really great.
    Now I can take 2 of my 8X8 leds and show some text.

    This 3x4 is, hmm, its what you said, crazy.
    May be for numbers only (?)
    Anyway its an interesting experiment, thanks for publishing.

  • in ESP32
    Avatar for JumJum

    Calling ESP32.getState gives an error:
    E (240505) esp_ota_ops: ota data invalid, no current app. Assuming factory

  • in JavaScript
    Avatar for JumJum

    Oh, hopefully, your kids will recognize that old man at the door ;-)
    Being serious now, what was strange in my code, which took away your time ?

    Thanks for your feedback. I will do as suggested.
    One thing I don't understand, there is an res.end in function uploadStd and another one in function uploadPipe. Are they never called, wrong location, or ??

    BTW, do you know about any guideline about setting up a VM for Espruino on Windows 10.

  • in JavaScript
    Avatar for JumJum

    Sorry, I don't have a linux build. My Ubuntu server is leased in the internet, and my laptop has windows.
    It's tested on ESP32, all my Espruino boards are without WiFi :-(

  • in JavaScript
    Avatar for JumJum

    Hopefully this helps (and there is no typo in text :-) ).

    First see attached files.

    • copy testPipe.html to sd
    • connect sd to your board
    • copy tesppipeJS.txt to webIDE
    • change ssid/passwd and pins to your board
    • send to your board
    • open http://nameOfServerOnYourBoard/testPipe.­html
    • fill textarea with a lot of chars, more than 1000
    • click Upload piped
    • check file on sd in webide console.log(require("fs").readFile("uplo­aded.html"). In my case only a few lines, up to 25, are found )
    • drop file on sd require("fs").unlink("uploaded.html")
    • click Upload eventdriven
    • do same check as before. In my case the file now holds everything

    BTW, looks like different sd cards result in different size for Upload piped

  • in JavaScript
    Avatar for JumJum

    Project is to support uploading of files and save on SD.
    It is tested on ESP32, I don't have hardware to compare with espruino board.
    If this is a ESP32 problem only, please move it to ESP32 forum.
    Doing the job with piping does not save full upload, some data at the end is missing

    function postUpload(req,res){
        var a = url.parse(req.url,true);  //there is a parameter given for location of new file on SD
        var f = E.openFile(a.query.pathname,"w");
        req.pipe(f,{chunkSize:32, end:false,
          complete:function(){
              f.close();
              res.end();
          }
        });
      }
    

    Doing same without piping works fine

    function postUpload(req,res){
        var a = url.parse(req.url,true);
        var f = E.openFile(a.query.pathname,"w");
        req.on("data",function(data){f.write(dat­a);});
        req.on("close",function(){
          f.close();
          res.end();
        });
      }
    
    • 4 comments
    • 197 views
Actions