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!
SoftwareSerial equivalent library for Z-Uno
Re: SoftwareSerial equivalent library for Z-Uno
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.
-
- Posts: 22
- Joined: 07 Aug 2022 21:54
Re: SoftwareSerial equivalent library for Z-Uno
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?
Do you have somewhere an example sketch showing the A02YYUW in use?
Re: SoftwareSerial equivalent library for Z-Uno
I'd love to hear if the HardwareSerial header worked out for you, or if you ran into any more issues.
-
- Posts: 22
- Joined: 07 Aug 2022 21:54
Re: SoftwareSerial equivalent library for Z-Uno
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?
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?