Avatar for iwae

iwae

Member since May 2017 • Last active Jan 2020
  • 3 conversations
  • 7 comments

Most recent activity

    • 6 comments
    • 6,202 views
  • in Electronics
    Avatar for iwae

    Hi @MaBe,

    thank you for your response. I will try that.

  • in Electronics
    Avatar for iwae

    Hi guys,

    in a project based on Arduino I used the AM2320 with the following library:
    https://github.com/hibikiledo/AM2320

    I couldn't find any informations how to use it with espruino.
    Can you help me with that?

    Thanks in advance

  • in JavaScript
    Avatar for iwae

    It's already great :) I saw that the spec defines that behaviour. So we can't do something different :)

    • 8 comments
    • 3,591 views
  • in JavaScript
    Avatar for iwae

    However it's not desperately helpful for what you're trying to do. You could try decodeURIComponent(els[1].replace(/+/g,"­ "));

    That is exactly what I do to fix it but I thought that decodeURIComponent should already result the same.
    It seems that it is my fault. Why are spaces something so special?

    application/x-www-form-urlencoded Default. All characters are encoded before sent (spaces are converted to "+" symbols, and special characters are converted to ASCII HEX values)
    https://www.w3schools.com/tags/att_form_enctype.asp

    I expected that a space would be

     U+0020		 	Space
    

    not just an "+".

    Confusing for me :)

    Thank you for your help!

    PS: Espruino is very cool :)

  • in JavaScript
    Avatar for iwae

    Hi guys,

    i have a problem with sending some data with an simple http form.

    HTML Code:

    
    > <html> 
    > <head><meta charset="utf-8"/></head>   
    > <body><h2>Konfiguration</h2> <form  action="#" method="post"> > <div class="container">
    > <label for="test"><b>TEST</b></label><input type="text" placeholder="Enter text" name="test" required>
    > </form>
    > </body>
    > </html>
    
    

    JS on Espruino

      var data = "";
      req.on('data', function(d) { data += d; });
      req.on('end', function() {
        postData = {};
        console.log(data);
        data.split("&").forEach(function(el) {
          var els = el.split("=");
          postData[els[0]] = decodeURIComponent(els[1]);
        });
    

    If I enter the following to the form: "PLUS++++LEER OK"
    The browser send: "PLUS%2B%2B%2B%2BLEER+++++OK"

    On espruino: test=PLUS%2B%2B%2B%2BLEER+++++OK
    Now I call the "decodeURIComponent" but the result is
    "PLUS++++LEER+++++OK"

    I would expect the following: "PLUS++++LEER OK"
    https://www.w3schools.com/tags/att_form_enctype.asp

    You have the same behaviour? The blank issnt decoded correctly.

  • in General
    Avatar for iwae

    Great. Thank you for answering my questions. Know i can find everything i need :)

    After i realise that the pico with an esp connected is not suitable for my idea, i bought a Wemos D1 mini pro with an mini sd shield. I like espruino so i flashed the firmware (esp8266_4MB) to it. Wemos D1 mini pro seems to have a flash of 16MB.
    So the left 12MB are unused?

    After some reading in github i saw (but i didn't understand the reason), that i can't use the sd shield with espruino.
    Link
    Until now i didnt test it, but it seems to be possibile with nodemcu.

  • in General
    Avatar for iwae

    Hi.

    I have some questions about the included implementations of different firmwares.

    1. I'm looking for the implementations like "Graphics.createArrayBuffer". Where i can find them?
    2. I also recognize, that the firmwares (for pico and esp8266) aren't the same. Where i can find the differents? For example the esp8266 firmware dont know the "Graphics" module. I would like to add this so esp8266.

    Can someone send me the right place to look for?

Actions