You should have some experience with soldering to connect your sensors properly, but yes, it’s best to remove all removable components from the EtherWing when you want to solder in the wires you’ll be hooking up your sensor with.
For the third one ( the dust sensor ), I connected it to serial 1 (rx/tx) on the ethernet featherwing. In my ino file, I was supposed to set it to something like this:
I think the pin numbers in my case will be different from 8? I am not sure what it should be. Others who have used this library set it to 8 ( when connected to serial 1 on their photons) but in my case, I am using an argon/xenon on an ethernet featherwing. I suspect thats why its not working.
I’m currently looking at the library and it’s quite convoluted as it is meant to support multiple platforms. Consequently there are lots of compiler conditionals that make following the code somewhat more complicated.
I now see that SERIALPORT1 is part of an enum in that library which is in turn used to select Serial1 in code (not the most elegant way of doing it tho’ IMO).
That TX_PIN = RX_PIN = 8 also appears to be a trick to enable some special treatment for Particle devices (again, there would have been more elegant, less confusing ways).
However, since @RWB appears to have such a sensor at hand (which I don’t) he might be able to assist - but as I’ve just seen, you have already contacted him in this other thread a few days ago.
Give him some time to respond. But looking at the code you provided, I’d suggest you first create a dedicated test project that focuses on that one sensor alone without all the other bells and whistles.
This way you can focus on one thing and people who may want to help don’t have to burden themselves with reading tons of unrelated code burrying the actual issue at hand.
It doesnt compile when I use Serial1. But works ok with SERIALPORT1. Maybe its defined in the library.
@ScruffR I used that library because it seemed to be the one most people used in the link i provided above, after trying a couple of others for the sps30.
I just created a test project today - stripping out everything except the code for the sps30. Still didnt work, Thats when I started looking at the way things are defined specifically for my use case. I am not sure @RWB is using the ethernet featherwing so his pin definitions might be different.
I am using this code now,
With the only changes made being
#define TX_PIN 8
#define RX_PIN 8
and commenting out the following in this sps30.h file.
Maybe you can post/link that project over at the other thread too - looking at the code you originally linked there I would have avoided going into that myself too, it's just TL;DR.
About this
As I said, that TX_PIN = RX_PIN = 8 has some special meaning in the library.
Once you change that, that special treatment will not happen.
I still can’t get this to work. I sent an email to the developer of the library and he said setting the TX and RX pins to 8 simply forces the library to default to the serial1 pins. In my case, thats 9 and 10 on the argon on the ethernet featherwing. That’s where I have the sensor connected too. I am using the exact basic code I posted above - nothing else in there.
particle serial monitor will not send anything to the device - it’s only a monitor
So hitting ENTER won’t do anyhting.
You need to use a different serial terminal program.