ParticleSoftSerial issues?

Hi.
I searched but did not find anything.
I’m trying to use ParticleSoftSerial to communicate between two devices.
But I’m getting this when trying to run the included PSS_SimleTest.ino
Does this library still support the Photon ?
If not, are there any good software serial alternatives ?

Thanks

lib/ParticleSoftSerial/src/ParticleSoftSerial.cpp:104:21: error: ‘ParticleSoftSerial::_debugPin’ cannot be used as a function
_debugPin(debugPin);
^

Oops, something must have gone wrong with the latest update.
I’ll fix it. (Update: Done v0.0.10 is live)

Meanwhile you can use the previous version by clicking the image button and select 0.0.8

Thanks! (and for the quick reply!!)
The example compiles now!

Question: I used pins 18&19 (or 2&3, depending on how you view it).
(upper left corner, next to GND, sorry for the crappy image but it was all I could find)


Whats the correct way of instantiating ParticleSoftSer using those pins ?

You should use the pin labels that are printed on the device, that way everybody knows what you are talking about (irrespective of how you look at the device :wink: ) and that’s what the silk screen labeling is for.

This is the official image (https://docs.particle.io/assets/images/photon_vector2_600.png)

When you use these labels you can also answer the question by means of the docs as they also always talk these pin labels.

The comment block in the library files states

*  Soft RX pin needs to be interrupt enabled, so on Photon D0 & A5
*    won't work as RX

The sample states

#define PSS_RX D2 // RX must be interrupt enabled (on Photon/Electron D0/A5 are not)

And here is the background to that limitation
https://docs.particle.io/reference/device-os/firmware/photon/#attachinterrupt-

But if you are using RX/TX there is absolutely no need to use ParticleSoftSerial since these pins are the hardware UART interface pins which can be used simply by means of Serial1.

1 Like

Thanks for your help!
And thanks for the tip using Serial1 instead.
Sadly the other device (Adafruit feather nRF52832) does not seem to have a Serial1,
so had to use software serial on it anyway.

All works now. Should of course have used a Particle Argon instead…

1 Like