• first, thank you all for your post!

    @Robin

    • Settings >> Communications >> Baud Rate set to 9600 > ok
    • pins Tx/Rx reversed test > checked
    • Same serial port (B7, B6 ) is working on other project of mine, tested on the same Pico (I will post the link of the complete tutorial on hackster.io probably tomorrow or before the end of this week), from now not yet tried to test with Software Serial on other Pico pin...
    • console.log(Serial1.available()) give me 0 output, it seem's ok reading the doc.
    • no clock line being used (in fact, I'm not sure what it is?, RTC module connected to the Pico?)
    • process.env output :

    "VERSION": "2v03",
    "GIT_COMMIT": "e77d74f6",
    "BOARD": "PICO_R1_3",
    "FLASH": 393216, "RAM": 98304,
    "SERIAL": "3f006300-04513432-33343134",
    "CONSOLE": "USB",
    "MODULES": "Flash,Storage,heatshrink,fs,net,dgram,t­ls,http,NetworkJS,WIZnet,tv,crypto,neopi­xel",
    "EXPTR": 536871212

    • Same Gnd for Pico and SDS011 : well, this thing, it can be a bit complicated:

    Pico is connected by USB to my PC, and the SDS011 (5V needed) sensor is powered by an Breadboard Power Supply Module 3.3V 5V.
    I do not think I can connect the Pico GND to the power supply module.
    There may be another solution, I have a power boost module 3.3V to 5V. I could connect Pico pin 3.3V & Gnd output to the power boost module to power the SDS011, but would not I risk wanting too much power from the Pico and damaging it?

    @AkosLukacs
    Unfortunatly, I need more time and skill in the protocol Serie to adapt your code! but I will do some test on my project reading your scripts.

    @maze1980

    below, sample output of

        for (index in data) { 
          console.log("> data:" + data.charCodeAt(index));
        }
    
    > data:170
    > data:192
    > data:134
    > data:80
    > data:239
    > data:170
    > data:192
    > data:107
    > data:179
    > data:170
    > data:192
    > data:92
    > data:251
    > data:170
    > data:192
    > data:82
    > data:255
    > data:170
    > data:192
    > data:110
    > data:170
    > data:248
    > data:251
    > data:170
    > data:252
    > data:171
    > data:255
    > data:170
    > data:255
    > data:170
    > data:255
    > data:171
    > data:255
    > data:171
    > data:253
    > data:235
    > data:247
    > data:235
    > data:253
    > data:251
    > data:245
    > data:255
    > data:245
    > data:255
    > data:171
    > data:255
    > data:183
    > data:255
    > data:107
    > data:255
    > data:91
    ...
    

    well, It's maybe a correct output, comparing the output serial from the Node.js script when the sds011 module is running, I've got

        <Buffer aa  c0  1b  05  7d  08  9c  eb  2c  ab>
    

    converting to decimal is

    [170 192 27  5   125 8   156 235 44  171]
    

    Reading the SDS011 doc, I should always get aa c0 (170 192 ) starting byte ... and ending with ab (171).
    But, from my new decimal WebIDE output reading,
    there not clean [170 192 data data data data data data data 171] repetitive sequence ?

    I have to go to work now (already late)
    thank's for your precious time folks!

  • Pico is connected by USB to my PC, and the SDS011 (5V needed) sensor is powered by an Breadboard Power Supply Module 3.3V 5V.
    I do not think I can connect the Pico GND to the power supply module.

    That (not connecting the two GNDs) is possibly the source of the "random" characters you see.
    I guess you can get (almost) 5V from the Pico directly, but I don't have one, and wouldn't want to damage you stuff. So maybe someone with a Pico, or @Gordon can confirm, whether you can power the SDS11 from the **** pin :)

About

Avatar for larry @larry started