Ifyousenddatainacontinuousstreamhowdoyouthinkthereceiverisgoingtobeabletomakesenseofit?You are sending the string representation of a value, with no delimiters, and expecting read() to do something meaningful with the data one character at a time. That won't ever work.https://forum.arduino.cc/index.php?topic=396450.0
That explains why it is not working, but how doesn't that work when I try sending it as an integer?
How are you sending "it" as an int? If your are using the Serial Monitor application to send data, the Serial Monitor app doesn't know an int from a hole in the ground. It understands how to send and receive text.That the text looks like a human-readable value that could be stored in an int is complete irrelevant.
I am reading the value from the sensor
and supposedly printing it on the monitor created using the SoftwareSerial library
I am not so sure if I have to use any delimiter