Announcement

Collapse
No announcement yet.

connection of 4d display with arduino

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

  • connection of 4d display with arduino

    hi,
    I want to connect 4D display with arduino with out 4d-arduino adapter . please help me how to connect.

    is there any separate code to be written in code.

    Thanking you,

    Hirak

  • #2
    Hi Hirak,

    It should still work with the same code if its correct. For more details on connection with an Arduino host you can refer to the Connect the 4D display module to the Arduino Host section of this application note: https://docs.4dsystems.com.au/app-note/4D-AN-00017

    Best Regards,
    Last edited by Jerson; 10 August 2020, 10:21 AM.

    Comment


    • #3
      Hi ,
      I faced some problem when I upload my design on display the design does not work. I didn't connect arduino. I only upload the design in the display from 4d workshop.
      My display model no Gen4-uLCD-70DT

      In display it is show

      Address Trap
      PC =-32761
      SP = -167
      UserHeap = 31310
      SysHeap = 11984

      Here I attached both image.



      please help me to solve the problem.

      Thanking You,
      Hirak Dash
      Click image for larger version  Name:	966dbaef-6f62-4092-a1bc-8b02ba89a33d.jpg Views:	0 Size:	65.8 KB ID:	73620Click image for larger version  Name:	43216d07-bc7e-4b44-ad14-f58ff09ed4cc.jpg Views:	0 Size:	56.3 KB ID:	73619

      Comment


      • #4
        Hello,

        Sorry to hear you have an issue with your application.

        I'm not really sure why this has happened. I tried to re-create the same design on my 7" display and it worked fine.

        If you have recently updated your Workshop to the latest (4.6.0.38) you may have been prompted to update your PmmC and Drivers which you can safely carry out.

        If you could possibly send me your project here I may be able to indenify the cause.

        Best regards

        Paul

        Comment


        • #5
          Hi paul,

          Recently I update workshop latest(4.6.0.38) , Most probably after that it is happening. is there any drive have to update?

          Actually when I operate the track-bar from my workshop window it is working perfectly that means track-bar is moving but after upload when i want to use it from 7'' display the problem occurred.


          Thanking you,
          Hirak

          Comment


          • #6
            Hi Hirak,

            You can Update to this PmmC

            Diablo16-R24.PmmC

            If you click on Tools then PmmC Loader it should do this automatically by clicking on Auto Update.

            Best regards

            Paul

            Comment


            • #7
              Hi..

              Is this marked driver to be update?



              Click image for larger version  Name:	image_4947.png Views:	3 Size:	230.9 KB ID:	73625




              Comment


              • #8
                hi,
                I want to control three track bar. when the reset button is pressed then all the track bar set on the middle position. but the problem is than when i press reset button it is taking approx 25 sec to change on the display. and also there is not any changed of PWM voltage. is this happen from code? here i attached the code.

                I am using arduino uno, 4d arduino shield version 2, Gen4-uLCD-70DT

                Code:
                #include<genieArduino.h>
                #include<SoftwareSerial.h>
                Genie genie;
                SoftwareSerial DisplaySerial(10,11);
                #define RESETLINE 4
                
                int RED=9;
                int GREEN=10;
                int BLUE=11;
                
                void setup()
                {
                  Serial.begin(31250);
                  genie.Begin(Serial);
                  genie.AttachEventHandler(myGenieEventHandler);
                
                  pinMode(RESETLINE , OUTPUT);
                  digitalWrite(RESETLINE,1);
                  delay(100);
                  digitalWrite(RESETLINE,0);
                  delay(4500);
                
                  genie.WriteContrast(10);
                
                 genie.WriteStr(0,"Designed by Hirak Dash");
                
                
                }
                
                void loop()
                {
                  static long waitperiod = millis();
                
                  genie.DoEvents();
                  {
                    if(millis()>=waitperiod)
                    genie.ReadObject(GENIE_OBJ_WINBUTTON,0x00);
                    genie.ReadObject(GENIE_OBJ_SLIDER , 0x00);
                    genie.ReadObject(GENIE_OBJ_SLIDER, 0x01);
                    genie.ReadObject(GENIE_OBJ_SLIDER, 0x02);
                
                    waitperiod=millis()+50;
                  }
                
                
                }
                
                void myGenieEventHandler(void)
                {
                  genieFrame Event;
                  genie.DequeueEvent(&Event);
                
                  int slider_value=0;
                
                  if(genie.EventIs(&Event,GENIE_REPORT_EVENT,GENIE_OBJ_WINBUTTON,0x00))
                  {
                    genie.WriteObject(GENIE_OBJ_SLIDER,0x00,128);
                    genie.WriteObject(GENIE_OBJ_SLIDER,0x01,128);
                    genie.WriteObject(GENIE_OBJ_SLIDER,0x02,128);
                    analogWrite(RED,128);
                    analogWrite(GREEN,128);
                    analogWrite(BLUE,128);
                  }
                  else
                   {
                    slider_value=genie.GetEventData(&Event);
                
                    if (Event.reportObject.index==0x00)
                    analogWrite(RED,slider_value);
                
                    else if(Event.reportObject.index==0x01)
                    analogWrite(GREEN,slider_value);
                
                    else if(Event.reportObject.index==0x02)
                    analogWrite(BLUE,slider_value);
                   }
                
                }
                Thanking you,
                Hirak

                Comment


                • #9
                  Hi,

                  It is more efficient to set the objects to report an event rather than to constantly poll for their value; this is more practical since if you are constantly checking you might miss out that the button might have already sent a report, putting it in a queue which results in your described delay. You can set the button and sliders to do a Report event in the Workshop4 Object Inspector, and just let the myGenieEventHandler to handle report events.

                  You can refer to this similar application note which uses sliders to change RGB LED color and a reset button to. https://docs.4dsystems.com.au/app-note/4D-AN-00010

                  Best Regards,

                  Comment

                  Working...
                  X