You are reading a single comment by @stephaneAG and its replies. Click here to read the full conversation.
  • Back !

    Haha, thanks, I get it now ^^ !

    -> I didn't bother setting them to undefined as it worked on the browser ( & I naïvely though it 'd do the same "as is" on the Pico ), but after re-reading the original code, you DO indeed set the (unique ) timeout to undefined ;)

    function onTimeout() {
      timeout = undefined;
      // check against our code
      // ( .. )
    

    For the different behavior ( read "different handling of supposed-implicit-undefined stuff") on the browser, IYO does it means/implies that browsers evaluates the js code in a quite-similar-yet-different manner ?
    Since the code worked flawlessly on the browser, I don't see many other possible reason(s) ? :|

    => I'll update the code hosted on the repo & flash that to my Pico to check it out* :D

    Also, "last but not least", I received the SIM800L module I ordered, tested it quickly with

    .. BUT ! -> it seems that I can't use the "AT" module on the Pico ?  
    
    When I tried quickly before having a nap, I ended up having the following logs:  
    
    

    var at = require("AT").connect(Serial2)
    ERROR: Unable to mount SD card : NOT_READY
    WARNING: Module "AT" not found
    Uncaught Error: Field or method "connect" does not already exist, and can't create it on undefined
    at line 1 col 23

    
    Same error when trying to use the following  
    
    

    var gprs = require('SIM900')
    ```

    Concerning the "ERROR: Unable to mount SD card : NOT_READY", I guess it's because Espruino tries to look for a connected SD card which may contain the module that's being loaded, but no idea why I wouldn't have the above modules
    -> I see 2 possible solutions here, either DL the module & host it on the SD, or pass a remote url to the require() call, but wouldn't simply updating the Pico's firmware do the trick ?
    ( I don't know how recent is the implm of the AT/SIM900 stuff ;| )

    Also, concerning the SIM800L module, I don't know if it had enough power to work correctly when powered from the Pico +5V through a 1N4007 diode ( voltage required is 3.7<->4.2V ): it worked correctly using that setup when connected to a laptop, but with the Pico setup I have already an SD card to power, hence my question: did you have this type of issue when having fun with the SIM900 ? :)

    • with a wire .. and with the intercom ringer ;p


    The attached images are posted as an update to the project.
    The repo containing stuff for the SIM800L is the following SIM800L
    The other repos stays where they belong are & 'll be updated


    2 Attachments

    • SIM800L_pinouts.jpg
    • SIM800L_connections.jpg
About

Avatar for stephaneAG @stephaneAG started