Announcement

Collapse
No announcement yet.

Visi and Serial communication not working

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

  • #61
    Hi Mick

    This seems to work

    Private Function GetChecksum(StringNumber As Byte, TempString As String)
    Dim l As Byte
    Dim chksum As Byte
    l = TempString.Length
    chksum = &H2 Xor StringNumber Xor l
    Dim n
    For n = 0 To l - 1
    chksum = chksum Xor Asc(Mid(TempString, n + 1))
    Next
    Return chksum
    End Function

    To use it just try

    Dim Checksum As Byte

    Checksum = GetChecksum(2, "1182")

    Comment


    • #62
      Many thanks Paul! Working

      Comment


      • #63
        Hi again Paul. I am making good progress - thank you for the code and I reiterate previous comments about the fantastic levels of support you offer

        My latest problem is the text disappears off the bottom of the screen so I need to be able to scroll. I followed a link from https://forum.4dsystems.com.au/node/40877 but the link is broken. I need for the display to automatically scroll by one line when the text reaches the bottom such that the latest line is visible, and a scroll bar at the side to allow reading of text that is now off the top of the screen. I'd also like to have the top line to remain fixed, bit like freeze panes in excel. Any tips/examples/other links pse? Thanks again. Simon.

        Comment


        • #64
          Hi again Paul

          I have been playing with the the code at https://forum.4dsystems.com.au/node/45220 but am unable to find a way to tweak it to simply scroll the whole screen when the lines of serial data go off the bottom of the screen. All I want is to initialise the touch screen function to move the lines of text up/down so they can all be viewed. Any tips please?

          Thanks, Simon.

          Comment


          • #65
            Hi Simon,

            Does it need to be the whole screen or can it be a window of text ?

            Best regards

            Comment


            • #66
              It could be either. The display is currently landscape and the text is just over half the width of the screen from left to right, and I am getting 22.5 lines vertically. If it was in a text box that would allow me to keep the top line fixed (outside of the box) which is perfect. I would prefer portrait but changing the line Display.gfx_ScreenMode(LANDSCAPE); to Display.gfx_ScreenMode(PORTRAIT); has no effect. And how to justify to the centre of the screen?

              Comment


              • #67
                Ok, thanks for the info. I

                I'll make an example of how I would do it. it won't be full screen but will be large enough I think

                Paul

                Comment


                • #68
                  Excellent, thanks, I look forward to it as this is the last hurdle

                  Comment


                  • #69
                    Hi Paul, when will you be able to post your example please? Thx

                    Comment


                    • #70
                      Hi Simon,

                      I'm still in the process of doing it. One thing I need to ask before I finish it, does it scroll in both directions and were you hoping to be able to do this by moving it with touch

                      Best regards

                      paul

                      Comment


                      • #71
                        Only scrolls vertically and yes by touch please. The text is now 3/4 the width of the screen and I'd like to keep the top 2 lines unscrolled so if you are creating a window of text that I change the size/position of that would work really well. Thank you Paul.

                        Comment


                        • #72
                          Have been trying a few things but not even close to getting anything to work properly. Looking forward to seeing what you come up with

                          Comment


                          • #73
                            Hi Simon,

                            I hit a few snags but I will be completed by tomorrow so hopefully it will do what you need

                            Best regards

                            Paul

                            Comment


                            • #74
                              Bet I hit more than you! Thanks again, appreciate the time you've put into this.

                              Comment

                              Working...
                              X