Announcement

Collapse
No announcement yet.

Mega 2560 data not updating

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

  • Mega 2560 data not updating

    Hello,

    Sorry to hijack this conversation, but I am having a similar issue to what has been described and I am not sure what to do.
    I know that everything is correct, myGenieEventHandler is called and doing what is asked, but whenever I ask the display to change a variable, be it a form, string etc. nothing happens. I have no idea what the issue is, so looking for some help.
    Are there other sources of error? My code is quite large, but I am only using 8 different forms. Could the problem be with my arduino?

    My hardware is an Arduino Mega2560 and a 4D systems uLCD-24PT.

    Kind Regards,
    Luca

  • #2
    Hello Luca

    Sorry to hear of your problems. I have moved your post to a new topic of its own, rather than on the old one you posted on.

    So you have a Mega2560, and a uLCD-24PT ? (is that a gen4-uLCD-24PT ?)
    How have you got it connected together?
    Are you using a 4D Arduino Adaptor?
    Are you using the Mega2560's Serial0 port, or are you using Serial1/2/3 ?
    Please can you attach a few photos of your setup, showing the wiring?

    You have the same baud rate in your Arduino code, as well as in your Workshop4 ViSi-Genie application?
    Are you using the genieArduino library, or the genieArduinoDEV library?

    Are you able to share your code? If you wish it to remain private, then please submit a ticket to us instead of using the forum, http://helpdesk.4dsystems.com.au

    Regards
    James

    Comment


    • #3
      Hi James,

      Yes, it is a gen4-uLCD-24PT, but I am not using a 4D arduino adaptor. I am using Serial 0.
      I can confirm that I have the same baud rate in the arduino code and Workshop 4 visigenie, both 9600.
      When I said I know that everything is correct, I tested a condensed version of the code and all the commands work as they should, so it has really perplexed me for a couple of weeks now. At one stage the code worked temperamentally, it would get to a certain stage and then just give up.
      All very confusing.
      I have attached the wiring below and will send a ticket to you, I apologise in advance for the code, I am not particularly proficient in arduino so it's a bit of a mess so I will update all my comments and send it tomorrow.

      Thank you so much,
      Luca

      Comment


      • #4
        Here are the wiring images: Click image for larger version

Name:	PXL_20220601_170545591.MP.jpg
Views:	33
Size:	2.43 MB
ID:	78166Click image for larger version

Name:	PXL_20220601_170541891.MP.jpg
Views:	33
Size:	2.08 MB
ID:	78165 Click image for larger version

Name:	PXL_20220601_170534369.MP.jpg
Views:	37
Size:	2.33 MB
ID:	78164

        Comment


        • #5
          Hi Luca

          Nothing is jumping out at me from your photos - so ill wait for you to raise the ticket and ill take a look at your program.

          You don't have RESET inverted do you? If you are not using the Arduino Adaptor then the reset needs to be Active Low - compared to with the Adaptor it needs to be Active High.
          Also checking you have Reset set to pin D8 instead of the usual D4?
          And you are using a delay after the reset to allow the display to start up, before you fire Arduino commands at it?

          Regards
          James
          James

          Comment


          • #6
            Hi James,

            I have done all of that, even with a bit of overkill for the reset time.


            Luca

            Comment


            • #7
              Hi Luca

              I received your ino file on the ticket system. Thanks.

              I can immediately spot a problem, you are using the Serial print statements to print to your console/terminal, but also using it to communicate to the display. You cannot do this.
              Serial is either for the display, or it is for another purpose - such as printing your debug messages.
              I suggest you change to Serial1 for genie, and move your wires over to the Serial1 pins, leaving Serial (Serial0) for your debug statements to the console/terminal.

              Because you have Serial.print statements all through your code, these will be 100% conflicting with the display, stopping it from working.

              Please change the display to Serial1 and your wiring, and let me know how you get on.

              Please also have a read of this Sticky post - point 1c is exactly what I am talking about.
              https://forum.4dsystems.com.au/node/40596

              Regards
              James
              James

              Comment


              • #8
                Hi James,

                That has fixed everything, I am so sorry that it was such a simple problem, but I really appreciate the help!!

                Kind regards,

                Luca

                Comment


                • #9
                  Hi Luca

                  I am glad the problem is solved, and no trouble at all.

                  Regards
                  James

                  Comment

                  Working...
                  X