Announcement

Collapse
No announcement yet.

Tutorials/Demos for transitioning Arduino programming from Visi-Genie to Visi

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

  • ademdeojee
    replied
    Hi again,

    I can see what you are saying when it comes to informational content regarding ViSi custom serial communication, and I thank you for bringing this up as we are now considering perhaps writing some code examples. If you would like to see some general information on communication protocol, you can have a look at these App Notes. I think that they could help slightly, although you should know that it has no specific code and is for an RS-485. Also, like I said, the Arduino side of code will likely share some of the functions as our libraries.

    Regards,
    Adem

    Leave a comment:


  • ironhalo
    replied
    Adem, thanks for the response, that is helpful info. I have already been studying the various pieces of the library, as well as the internal functions guide. So I am starting to get a feel for what this will entail. I also realize that there is such a wide variety of ways a protocol could be implemented that it wouldn’t make sense for 4D to publish a definitive guide on how that should be done. I am surprised however that there doesn’t even seem to be one simple example of this anywhere in your content catalog. 4D has created so much helpful content for so many other areas of the IDE, with a rich variety of examples for users to learn from (even for some of the easier concepts which arguably might not warrant such in depth demos). This on the other hand, creating a custom 2-way communication protocol to take the place of the Genie Arduino library, this I can see being a sizable hurdle for a good number of Genie/Arduino users, creating a formidable barrier to entry to the Visi environment. And yet 4D has zero demo content available on the topic, if even just to show one or two possible ways a protocol could potentially be implemented. This seems like a big missed opportunity to educate a large portion of your Genie user base and help them take their skills to the next level. For me personally, one or two examples is all it takes for me to grasp many programming concepts. Reference manuals are a must, but the examples are really where the learning occurs for a lot of people.

    Are there truly no staff-created or user-created examples of an Arduino<->Visi serial protocol available that you can share? Again, I think it would be super helpful for anyone trying to learn this to see even a very basic implementation of this illustrating the fundamental requirements to make it work properly. Please let me know if you can scare up anything that might be of use. Thanks in advance.
    Last edited by ironhalo; 5 March 2021, 03:25 AM.

    Leave a comment:


  • ademdeojee
    replied
    Hi ironhalo,

    If you would like to work with ViSi and still wish to have Serial Communication between your display and your Arduino, you will have to build your communication protocol from scratch using 4DGL and the Arduino environment. As you know the workload and codebase will scale depending upon the amount of control and functionality you would like to have. I can't provide you any documentation regarding ViSi serial communication as the possibilities of what to make is so wide, so it is up to the customer to establish a protocol.

    The Diablo-16-Serial-Arduino library is for the serial environment so it does not really apply in this ViSi environment, although you can get an idea of how to build a protocol on the Arduino side by looking at the library header and implementation file. For the display/ViSi, I recommend you take a look at section 2.12 of the Diablo16 Internal Functions Reference Manual. You'll see here how a serial connection can be established. With these functions, you can send event bytes with the serout function and receive bytes with the serin function.

    Let me know if you need more information.

    Regards,
    Adem

    Leave a comment:


  • Tutorials/Demos for transitioning Arduino programming from Visi-Genie to Visi

    Hello. Over the last couple of years I have developed several successful Arduino-controlled Visi-Genie applications. I have however hit the limits of what can be achieved with Genie in regards to navigating multiple forms and employing re-usable/persistent widgets. I have begun learning what will be required to develop my next app (and also re-develop my current one) in Visi. I have learned that moving away from Genie means losing the Genie Arduino library, including the event handling for receiving communication back from the Diablo, and that I must develop my own protocols to accomplish this 2-way communication under Visi. This seems a bit overwhelming at present, so I'm hoping someone can point me to some good examples or demos that focus on developing these protocols. In the past I have created my own Arduino classes, structures and routines for communicating between multiple MCU boards via Serial, so this is certainly within my reach. However I learn best by examples so what I'm looking for presently is any existing content I can study that will help me make the transition.

    FYI - I am currently studying the "Big Demo" example contained in the Diablo-16-Serial-Arduino-Library. Unfortunately this only demonstrates the functions for MCU outgoing communication from the Arduino to the Diablo. What I need most is further explanation, with examples, of the code I'll need to develop to replace the Genie library's event handler functionality...both the 4DGL code that must be employed on the Visi side to originate the Diablo's outgoing communication and the Arduino code to facilitate receiving/processing it. Can anyone point me to existing content that I can learn this from?

    Thanks in advance.
    Last edited by ironhalo; 2 March 2021, 09:48 AM.
Working...
X