Announcement

Collapse
No announcement yet.

Problem reading strings

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem reading strings

    I am using Visuino with an esp8266 as a web client downloading API info regarding local transport departure times. I have configured a software serial port to avoid using port 0 for both arduino code loading and connection to the 4D display using ViSi Genie. The display is set up with a strings object to show the incoming text whuich I can see coming in on the serial monitor. However I cannot get the display to show this. I know the esp8266 is communicating over the software port as can see LED digits changing but the text string box is always blank. I can set up a fixed text value with Visuino and this is shown as a string on the display in the same position so I know that the string object responds to this as expected, but for some reason I cannot see the web data. Any advice? Thanks.

  • #2
    Hi,

    Sorry to hear you are having a problem writing data to a string object. Would it be possible to show me an example of the type of data which is being sent to the strings object as the strings object appears to be working fine when you send it a fixed text value.

    Best regards

    Paul

    Comment


    • #3
      Hi Pauleilio.,

      Here's an example of the received data:

      atcocode":"6200242670
      stop_name":"Elm Row
      locality":"Hillside, Edinburgh
      line_name":"16","direction":"Bonaly, Edinburgh
      best_departure_estimate":"10:07
      best_departure_estimate":"10:09
      line_name":"22","direction":"South Gyle, Edinburgh
      best_departure_estimate":"10:17
      line_name":"11","direction":"Gilmerton, Edinburgh

      This is stripped from an incoming data stream once very minute. The intention is to break up the above according to various keywords such as "atcocode" or "line_name" to send as different string objects. But I've since noticed if I cut and paste the above example text and use this as a text value, I can't see this either but can see, for example, "This is a string". In the strings object editor, style is set to "message" and the object box is 470x200, and set to 24 point arial text.
      Last edited by Spreader; 6 May 2020, 04:56 AM.

      Comment


      • #4
        Hi,

        I tried this with the GTX tool using one of the lines of data and it seemed to work fine. I will try it with a connected ESP8266 to see if I get the same result as you.

        Best regards

        Paul

        Comment


        • #5
          Thanks Paul. I also tried with one line and it works fine as a text value also good with two but nothing beyond this. But regarding the incoming text, I still cannot get the first line to display.

          Comment


          • #6
            I'm at a loss to understand why no dynamic string is being displayed. I can see the data coiming in from the server every minute on the arduino serial monitor but the display itself will not show it!

            Comment


            • #7
              I see from reading other posts that the dynamic string charater limit is set to 75. The problem is I still can't see a 21 character message. WTF I am doing wrong??

              Comment


              • #8
                Hi,

                Sorry for the delay in resolving this. I hope to be able to carry on with it today. Could you please let me see the ESP8266 code you are using for collecting the data.

                Best regards

                Paul

                Comment


                • #9
                  Hi Paul, As I said, I am using Visuino to code so don't know if this would be of much help. With the 75 character limit in mind, I've split the strings up using one line per string object to sure to be less than 75, but I still cannot see the live transmitted data, even if I put this into a text array first.
                  Last edited by Spreader; 8 May 2020, 11:50 PM.

                  Comment


                  • #10
                    Hi,

                    Ok, yes I remember about Visuino. I was going to ask if it was possible the data was in a JSON format but as you have split them up anyway and converted them to text arrays then this would rule out any potential issue.

                    As it is, you don't have any comms issues as everything else seems to work fine so we don't suspect Software Serial to be a problem and as you can send fixed data to the strings object there isn't any issue there either. The strings limit is plenty large enough for what you are trying to send.

                    The one thing I could suggest but I don't think it will make any difference is if you add a 0 to the end of the the text array you created from the strings that you split.

                    Best regards

                    Paul

                    Comment


                    • #11
                      Hi Paul, thanks for getting back. No adding a 0 to the end of the string doesn't make a difference. I'll try using an LCD character display just to make sure that the data can be displayed. I'll get back if I make progress. Cheers.

                      Comment


                      • #12
                        I cannot see the live data on a character LCD. Seems I've seriously misunderstood something. I'd assumed text data received and displayed on the arduino serial monitor was stored by the sketch and was available to process in real time. Seems this is not the case. Back to the drawing board.

                        Comment


                        • #13
                          Thanks for letting me know. I hope it's a simple fix. Good luck

                          Comment

                          Working...
                          X