Announcement

Collapse
No announcement yet.

More control over widgets

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • More control over widgets

    I am working with the 4Duino-24 as a uLCD-24PTU in order to use Visi-Genie. At the upper part of the screen, I have need for 3 dynamic text items: Gear Position Indication; Shift Indication; Speed. In order to have a polished user interface, the font attributes can not be generic. Considering the Gear Position Indicator, it needs to be set from code to be a green "N" or the numbers 1-6 in grey. This is a fixed number of possibilities, so I am guessing you would suggest images. I see that a userimage can be used like a slideshow, but how would I explicitly choose an image to display? If I used static images stacked, how would I programmatically select which one was on top?

    The Shift Indicator is simply a text object which will need to blink when a certain preset RPM is read through the analog input. It could be an image, but how do I show/hide it and make it blink?

    What about the speed? This changes constantly.

    What I am struggling with is the lack of control over objects and their properties (visible, forecolor, fill color, caption, etc.). Without control over objects, I also wonder how to update parts of the screen without updating the whole screen. I've built my main screen and I am extremely happy with the look and feel your Workshop easily gave me, but I am lost on how to access and dynamically set all the attributes available at design time. Some workarounds would force terrible compromises in the polished look.

    Also, I'm sure it is because I am not working with the 4Duino-24 explicitly selected, but the pinins were not responding to my tests with a potentiometer wired in.

    If I am using the wrong display/tools for the job, would you have a suggestion on what would be more appropriate? Thank you.

  • #2
    Hi PatrickC,

    You might be interested in using the 'Extended graphics' environment for the 4Duino. It gives you more control of the widgets by coding exactly how should they behave. Like displaying a specific frame for userImages widget.

    You could also create a an 'blinked' version image of your shift indicator and alternate it between the non-blinked image and with the blinked one. For static Images, you could clear the whole background by using Display.gfx_Cls() or a part of the background like drawing a black(or other colored) rectangle or display an image to with the correct size to replace the pixels.

    You might find basic examples such as the one found in 'File' - 'Samples' - '4Duino' - 'Extended Graphics' - 'UserImages' or the example projects in the 4duino website helpful in your application.

    http://www.4duino.com/projects/

    Best Regards,


    Comment


    • #3
      Thank you for the quick reply over the holidays. I meant to get back to you sooner, but I thought to try some of what you mentioned first. I spent hours trying to create graphics to use, both BMP and PNG, but what I created in MS Publisher and Paint would not look the same in 4d Workshop. A couple things I learned from this that should be in your user guides: get a free Vector Graphics editor ( I am loving Vectr); within your vector editor, draw at the correct size so no scaling is needed. Also, when creating a bitmap for UserDigits, first place a zero in your graphics editor in the size you need, then draw a box to contain it. Duplicate this box so you have 10 or 12 of them, depending on whether you want leading zeroes or not, and place them side by side. Then put the rest of your digits in the boxes and size your image to the overall length and width, width being important. This will give you centered digits and an image exactly 10x (or 12x) the size of one. This was a huge struggle, and it should have been detailed in the user guide... there are relatively few widgets, and there is no reason not to explain them better.

      That aside, I continued to spend many hours creating png images and my gui looks great! But I can no longer get my 4Duino to show up in the port listing no matter which USB port I plug into. The adapter for Visi-Genie still works fine, but I can't upload in basic, extended, or the Arduino IDE. I have uninstalled and reloaded both workshop and arduino IDE many times, and I have done the SPE load.

      I am certain that I will be having a few questions once I can get programming and uploading again... can you help me get connected again?

      Lastly, the workshop code interface is very bad on my Win 7 laptop... if I click somewhere to place the cursor and start typing, the text is inserted somewhere else on the code line. This has made for some very trying and tedious attempts to learn by doing! Help, please!

      Thanks, and Happy New Year.

      Comment


      • #4
        The correct way to create UserDigits is documented in the comments of the Clock Picaso ViSi example, and with additional information for the -ve enhancement at the start of the NegDigits example. We should look at adding this to other documentation.

        Not exactly sure what you are seeing in Win7, as we aren't aware of any issues. Can you describe what is happening in a step by step manner, with a screenshot or two?
        Mark

        Comment


        • #5
          Thanks again for the quick reply. Please do go through all the widgets and try to get info on them all in one place; your info is extremely fragmented. I've attached a screenshot that should explain the code editing weirdness. I am also still unable to use the microUSB because my computer no longer sees the 4Duino as plugged in... so no basic or extended environments, and no Arduino IDE coding.
          Attached Files

          Comment


          • #6
            I keep trying to figure out why the 4Duino no longer shows up when plugged in using the microUSB. This time, I realized there is a USB Driver on the 4Duino product page, so I downloaded it again. I have no idea what to do with the two files (.cat and .inf). The 4Duino datasheet mentions your driver, but doesn't say what to do with it.

            Comment


            • #7
              Hi PatrickC,

              You can try and take a look this website on windows drivers:
              https://www.drivereasy.com/knowledge...able-exe-file/

              After connecting the 4Duino, try checking it's com port at the device manager. Then right click at it then try to update/install driver.
              Can you also try a different cable if you have one?

              Best Regards,

              Comment


              • #8
                Dear PatrickC,

                Thank you for using 4D LCD products. first , to compile Arduino
                sketches, you need the Arduino IDE installed. There is a bug
                in the older version of Arduino IDE (version 1.6.12) so please
                download the latest version (1.6.13).

                Here is the link:

                https://www.arduino.cc/download_handler.php

                In the Arduino IDE, Click on File-->Preferences-->
                In the additional Board Managers:

                Paste this link:

                http://www.4dsystems.com.au/download...ems_index.json


                Under the Tools Tab, Click on Boards--Boards Manager-->Type-->Contributed
                -->Click on 4D avr boards by 4D systems-->Choose 1.6.12 then click on install

                If you are succesful in installing the installation for 4DUINO, you can see
                in the Tools->Board menu that the 4DUINO is listed under 4D systems Boards.

                Attached is the Windows Signed driver for the 4Duino. In the device manager
                click on the 4D systems 4DUINO with exclamation point. Click on update
                driver software. Browse my computer for driver software.
                Click on browse and select the directory of the 4d systems 4DUINO Signed driver folder.
                then click on install.


                On the device manager under COMS & LPT you can see the 4D systems 4DUINO listed
                if you are succesful in installing the device driver.

                Best regards,

                Comment


                • #9
                  The cable was a good thought that I should have tried... two other cables, but still not showing up in the ports. I had already done everything else a couple of times. Unfortunately, without it showing in the ports, I can't right-click and update the driver. So still stuck.

                  Using the adapter for Visi and Visi-Genie still works fine, and I did do the SPE load again before trying the other cables. My other Arduino boards are still showing up in the ports when I connect them.

                  Comment


                  • #10
                    Dear PatrickC,

                    Thank you for using 4D LCD products. Could you please send us a screenshot of the 4Duino when it powers up? Could you press the RESET button for the ATMEL
                    Microcontroller if it RESETs or check if the push button switch is stuck?

                    Best regards,

                    Comment


                    • #11
                      for shift light you can use a timer in visigenie to activate a gif which is what i have done in my video

                      https://m.youtube.com/watch?v=QX34t0PSPjA

                      around 0:43 you can see how i did the shiftlight which is 4 gifs
                      Last edited by tonton81; 5 January 2017, 11:59 AM.

                      Comment


                      • #12
                        tonton81: definitely inspiration! very nice display! Do you have a writeup anywhere on how you did all of that? The ONLY think I am unhappy with on my GUI is the RPM gauge, which is the Meter widget. Not knocking the widget because it does the job, and yours isn't what I would want, either. More just curious how you got the needle to work with the graphic, and where you got the graphic.

                        Noel: I've tried plugging into my computer at work, and nothing registered their, either (no new ports show up in control panel). The Atmel reset button is doing nothing; the 4Duino splash screen is displayed and does not black out when the Atmel reset is pushed. The reset button is not stuck physically down as far as I can tell... it feels like the other reset buttons.

                        Comment


                        • #13
                          which graphic? the background? the image on sd is pretty big because the needle has 9000 positions, all my data is pulled from the ecu, hscan, and bcan networks

                          Comment


                          • #14
                            The graphic for the RPM gauge. So you don't redraw the needle, you have a separate graphic (gauge and all) for each needle position?

                            Comment


                            • #15
                              the gauge is one of the widgets in front of a 1080P wallpaper

                              Comment

                              Working...
                              X