You are reading a single comment by @user118421 and its replies. Click here to read the full conversation.
  • I get an error when trying to verify the firmware version. Running this;

    var serial = Serial2;
    var pins = { rx: D0, tx : D1 };
    function test(baud) {
      serial.removeAllListeners();
      var l="";
      serial.on('data', function(d) {l+=d;});
      serial.setup(baud, pins);
      serial.write("AT+GMR\r\n");
      setTimeout(function(){console.log(JSON.s­tringify(l));},800);
    }
    //digitalWrite(B9,1); // enable on Pico Shim V2
    setTimeout(function() { test(9600); }, 2000);
    setTimeout(function() { test(115200); }, 3000);
    setTimeout(function() { test(57600); }, 4000);
    setTimeout(function() { console.log("Done!"); }, 5000);
    

    Gives me this response;

    >Uncaught ReferenceError: "Serial2" is not defined
     at line 1 col 14
    var serial = Serial2;
                 ^
    Uncaught Error: Cannot read property 'removeAllListeners' of undefined
     at line 4 col 7
    serial.removeAllListeners();
          ^
    in function "test" called from line 12 col 10
    test(9600);
             ^
    in function called from system
    Uncaught Error: Cannot read property 'removeAllListeners' of undefined
     at line 4 col 7
    serial.removeAllListeners();
          ^
    in function "test" called from line 13 col 12
    test(115200);
               ^
    in function called from system
    Uncaught Error: Cannot read property 'removeAllListeners' of undefined
     at line 4 col 7
    serial.removeAllListeners();
          ^
    in function "test" called from line 14 col 11
    test(57600);
              ^
    in function called from system
    Done!
    
About

Avatar for user118421 @user118421 started