Announcement

Collapse
No announcement yet.

OnEvent handler-Serial communication- visigene environment

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

  • #16
    Yes , there is a common ground btw the MCU and the display. Now I am able to get detect the ACK massage but not he report even (0x7) and only if i double clicked the button why is that? I
    Last edited by bemin; 4th December 2019, 01:54 AM.

    Comment


    • #17
      Hi,

      Not sure why that is happening, would you be able to send me the project to test here.

      Best regards

      Paul

      Comment


      • #18
        Okay , I think now I can capture the report message. I have another question how can I add a text user input - Is it possible using the GENEI protocol ?
        and how can I add a dropp down menu ?

        - Text user input--> where the user can click on it and write a number
        Last edited by bemin; 4th December 2019, 09:16 AM.

        Comment


        • #19
          Hi,

          You can achieve the text user input by using the keyboard object and then using your MCU to process the data and send back to a strings object. This appnote might help with the keyboard object

          https://4dsystems.com.au/blog/4d-an-00003/

          The drop down menu isn't possible in Visi-Genie without the use of Magic Code and then would become a custom code that would do the drop down menu and also rebuild the screen when the drop down is closed. Magic Code is available in the Pro Version of Workshop 4

          Best regards

          Paul

          Comment


          • #20
            okay thanks I'll check this out!
            Also to Query an object,
            I know i Have to send a read request then read the data from the serial. do I need to wait few Mico-Sec before start reading data from the serial port

            Comment


            • #21
              Hi,

              If your MCU has a buffered serial then you can just check to see if serial is in the buffer without a specified wait period. A lot of MCU's have a Serial.available() equivelant eg

              if(Serial.available() > 0){

              // get serial

              }

              I''m not sure how it is done on your MCU though.

              Best regards

              Paul

              Comment


              • #22
                yes I'm using Serial.available() ; but for some reason , when I send a read request and then read report object in debug mode , it works but when i run it continuously It won'[t

                Comment


                • #23
                  I have another issue now,

                  The button are very sticky I have to push and hold the 4DButton to get the report massage sent correct
                  and if i didn't do that I get something like 253 sometimes ?
                  any way to fix this ?

                  Comment


                  • #24
                    Hi, How can I make the Keyboard show /appear when I click a button or a text object to edit it ?

                    Comment


                    • #25
                      Hello, Is there anyone here ? I'm having so much troubles with your LCD and Geni protocol and I need someone to help ?!
                      If i leave my system running for few days the objects that I have on the LCD disappear, and they don't appear back unless I start touching the screen randomly ? How can I avoid that ?

                      Comment


                      • #26
                        Hi,

                        It is not usual for objects to disappear. Do you maen they all go off when left on for a few days.

                        Would it be possible to send me your genie application as well as your MCU code to see if we can find a reason.

                        Best regards

                        Paul

                        Comment


                        • #27
                          Yes most of them.
                          The MCU sends values to the LCD to update stringtext and it has few buttons. All objects disappeared but the ones gets updated by the MCU


                          see attached
                          Attached Files

                          Comment


                          • #28
                            Please find attached pics, It happened again. I left it running over night and the objects disappeared.
                            Attached Files

                            Comment


                            • #29
                              Hi,

                              Thanks for the code. I will have a look through it today to see what is causing the issue.

                              Best regards

                              Paul

                              Comment


                              • #30
                                Hi,

                                Could you please let me know what SD card you are using

                                Paul

                                Comment

                                Working...
                                X