No announcement yet.

128 G2

  • Filter
  • Time
  • Show
Clear All
new posts

  • 128 G2

    Ok... with visi I created the gauges and whatever else, they run those nice demos, but how can I get this display to comunicate with arduino when it is in VISI mode?
    When it is in serial all clear, but trying to use it with visi is a living nightmare, I could not find information about anywhere.
    any help will be appreciated.

  • #2
    Hello Cla

    Well ViSi and Designer are both environments you need to write 4DGL code in. There is no defined standard here, it is fully up to you to write it the way you want to.
    Serial is more prescribed as you only need to write code from your Arduino and the display reacts accordingly. With ViSi you need to program the display, and then you need to program the arduino too, so one sends something the other is able to understand, and vice versa. So you need to write your protocol from scratch, based on the requirements you have and set yourself.
    Its just 2 devices connected on a communication bus, you need to define what they send to each other.

    What one person does may be totally different to another, its purely based on what you want to achieve.

    For example, if you set your Arduino to send a number over the Serial Port to the 128G2, you then need to write 4DGL code to receive this number and then do whatever you want to do with it, such as set the value of a Gauge.

    It can be complex, yes. This is fully up to you to do it the way you want.

    The alternative is you stay using Serial, but you utilize graphics you design in ViSi.

    I will get one of my colleagues to reply with some potential App Notes which might explain this. I guess this will be simpler as the protocol is still Serial, but you are just making use of the graphics widgets etc from ViSi, and calling/showing them as required.



    • #3
      Hi James,
      thanks for the fast reply.
      Do you think it would be possible to have some demo code to wrap my head around? that would be very helpfull to get me started.


      • #4
        Hi Cla,

        For the Serial environment, you might be interested with the following:

        Serial Goldelox Getting Started - The SPE Application

        Serial Connection to an Arduino Host

        Serial Arduino How to Draw Shapes

        For implementing UART communication in 4DGL, kindly see:

        4D-CD-00045 Designer or ViSi Goldelox Serial Communication

        As James said, you will have to define your own serial comms protocol if you want to use ViSi/Designer. 4D-CD-00045 Designer or ViSi Goldelox Serial Communication shows you the basics.

        For the Serial environment, there is already a protocol. You will just have to learn how to use it, starting with the first three app notes listed above.

        Hope this helps and regards.


        • #5
          Hi Cla,

          Once you're acquainted with the basics (of the Serial environment and Protocol) you might want to test the media commands in the Serial commander (select the Media tab). You could make the display module show the objects by following the "procedure" for displaying objects when you're coding in Designer/ViSi (initialize usd card, set the address, show image, etc). Relevant application notes for this step are:

          Serial Displaying Images from the uSD Card RAW

          Serial Goldelox Displaying Third Party Fonts

          You could then proceed to writing the sketch for your Arduino host using the Goldelox-Arduino Serial library. If you study the GoldeloxBigDemo, the use of the commands for showing objects on the display is demonstrated in the function "Media_Tests(void)".

          We will be doing another demo for this besides what's in GoldeloxBigDemo, but I think you can use the above info as a reference if you want to move on ahead.