Hi, I've been looking for example UART code for the SPS30 online for the arduino. I've found code that uses I2C, but not UART. I figure someone already knows of something that exists already and your help would be greatly appreciated.
Set the baud rate of the sketch to match the device and when Serial.available() returns more than zero read the byte that is available
Depending on the board that you are using (which is it ?) you may need to use SoftwareSerial to connect to the device instead of the hardware Serial pins
NOTE : this assumes that the device has a TTL level serial interface and not RS232 or other more exotic variety of serial interface
The SPS30 datasheet describes the UART protocol in complete detail. It should not be a big problem to code your own UART interface, although it does involve coding the SHDLC protocol, or you could download the manufacturer's PC viewer software (not for Arduino).
Since the serial Baud rate is 115200 and cannot be changed, you will need to use a hardware UART. Software Serial won't work at that rate.