Page 1 of 1

SoftwareSerial equivalent library for Z-Uno

Posted: 07 Aug 2022 22:01
by Steve_Elves
I want to connect to an A02YYUW ultrasonic distance sensor. The one I have works with my Arduino Uno but needs a library called SoftwareSerial.h. Does anyone know if this library is compatible with the Z-Uno? If not, is there an equivalent that someone has successfully used?

I've tried to bring in the Arduino version but I'm having trouble getting it to work. Any help/suggestions greatly appreciated!

Re: SoftwareSerial equivalent library for Z-Uno

Posted: 09 Aug 2022 03:22
by PoltoS
Z-Uno 2 does not have such SoftwareSerial.h (the Z-Uno 1 had it), but you don't need it anymore as Z-Uno can do hardware serial at a much slower baud rate than before. Please try to use standard serial instead.

Re: SoftwareSerial equivalent library for Z-Uno

Posted: 10 Aug 2022 05:37
by Steve_Elves
Ah, thanks PoltoS! I am presuming therefore that I can use the "HardwareSerial.h" library, connecting TX to pin 7 and RX to pin 8. Is this correct? Can you suggest anything else I should do to make this work?

Do you have somewhere an example sketch showing the A02YYUW in use?

Re: SoftwareSerial equivalent library for Z-Uno

Posted: 21 Aug 2022 17:27
by alexis92
I'd love to hear if the HardwareSerial header worked out for you, or if you ran into any more issues.

Re: SoftwareSerial equivalent library for Z-Uno

Posted: 24 Aug 2022 03:55
by Steve_Elves
Alexis:
I should have updated the post - yes, HardwareSerial worked just fine - I'm happily receiving 4 bytes of validated data from the A02YYUW.
I'm having problems displaying the results correctly on the LCD - I have a 2x16 standard LCD hooked up using I2C, but the data isn't appearing correctly on the screen (I just get a garbage character). I'm sure it's a problem with my code, since the serial monitor shows the values correctly.
I'm using the ZUNO_LCD library - is there another library that you know of that will work with Z-Uno?