• Hey Gordon, thanks for the continued follow ups. I have made sure that it is puck.js firmware being uploaded to the board. That said, I upgraded the firmware tonight to v2.01. I immediately noticed that code is substantially faster to load to the board. I also hard reset prior to uploading the firmware to clear anything out beforehand.

    I measured the voltage passed to the puck from the output of the PIR sensor, it logs 3.27V at it's high peak, so everything looks good there.

    I have omitted the PIR sensor for the time being as I really want to focus on getting the code to work after removing and restoring power. If I disconnect from the serial bluetooth connection, but keep power supplied to the board, it will continue to work. However, if I remove power and restore power, I get no response when sending on or off via text message.

    I did notice that if I restore power and connect via web bluetooth and then call the load(); in the REPL, that it initializes and then works. I have a feeling that maybe the code running prior to the modem getting power may be causing problems when the code runs. However, I have also tried applying power to the modem until the modem boots up, then powering up the module and still no luck. I then tried to wrap all of the code in a setTimeout(function(){all of code here},12000); to see if setting a 12 second delay to allow the modem to boot up would help.

    I've commented out Bluetooth.setConsole(1) as well as uncommented it. As mentioned, it all works great, when connected to the web console and even after disconnecting from the console, just as soon as I remove power, it no longer works.

    As for a sketch of what I have wired up, I have attached a schematic with Fritzing(I had to substitute a pico.js board as there were no puck.js boards)

    It's pretty barebones as I have removed the PIR sensor from the equation at this time. Please let me know if you have any other thoughts. I did get the MDBT42Q breakout board today, but aside from soldering the headers to the board, I haven't been able to flash firmware or test on that board yet.

    Thanks again for all of the help and please let me know if you have any questions for me. I have also included the current sketch that I am using (I've omitted all of the other tests that I had mentioned, to confirm that even on a clean sketch using direct to flash execute code on boot and only the SIM800L module with 3.3 V power supply being fed to the puck it is still not working as expected).

    Bluetooth.setConsole(1);
    Serial1.setup(9600, { rx: D29, tx : D28 });
    var ATSMS = require("ATSMS");
    var sms = new ATSMS(Serial1);
    
    sms.init(function(err) {
      if (err) throw err;
      console.log("Initialised!");
    
      sms.list("ALL", function(err,list) {
        if (err) throw err;
        if (list.length)
          console.log(list);
        else
          console.log("No Messages");
      });
    
      // and to send a message:
      //sms.send('+441234567890','Hello world!', callback)
    });
    
    
    sms.on('message', function(msgIndex) {
      console.log("Got message #",msgIndex);
      sms.get(msgIndex, function(err, msg) {
        if (err) throw err;
        print("Read message", msg);
        var txt = msg.text.toLowerCase();
        if (txt=="on") LED1.set();
        if (txt=="off") LED1.reset();
        // delete all messages to stop us overflowing
        sms.delete("ALL");
      });
    });
    

    2 Attachments

About

Avatar for ok2chatt @ok2chatt started