Announcement

Collapse
No announcement yet.

multi gague project

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

  • #31
    Hello again,
    Can you help me with switching the forms via press button (giving ground) and Arduino Nano as a host?
    MULTI_GAUGE_BRO1sketch_may09a.ino I am trying to figure out how to do it ,but...

    My idea is that every time you press the button the form change to another (lets say from form0 to form1,then at next press button from F1 toF2 and so long , when riches the last form comes back to F0).
    best regards
    Jacek

    Comment


    • #32
      Hi there, looks that it starts to work ( a bit). I have changed the host to Arduino Uno and set the SoftwareSerial with pins 10 and 11 , so it start to display changing values.
      still need help with switching forms.
      On the other hand,Now I see that the needle is "erasing" the background, as Juniel said before. Is there an solution for this?
      And "tha" question.
      As my pixxie LCD-13P2 has no uSD, Is there any possibility to connect a memory card ( maybye via arduino host ) so I could use smart gauges and more stuff that requires more memory?
      Best regards
      Broda
      Last edited by [email protected]; 25 May 2021, 07:22 AM.

      Comment


      • #33
        Hello Broda

        Looking at the code you posted in #31, I dont quite follow what you are doing with the form changes.

        You set the Arduino A3 pin to be FORMSWITCH, you then set it to be an input, and then you do an Analogwrite to that pin...
        An input is from something external. You are writing an output from your Arduino, so I dont understand what you are trying to achieve there.
        You then have if(FORMSWITCH,0 );
        Again, not sure what you are trying to do here.

        Maybe explain what you are trying to do overall, what you have wired up to the Arduino, what you want it to do exactly, and go from there.

        Regards
        James

        Comment


        • #34
          Ok James. I'm just a beginner (very beginner) so please don't look to hard on what I have done.
          Now, as my display in non touch type, I want to have an external push button that when I press it the actual form change to the next. So every time I press the button the genie navigate to the next form and when it reaches the last one (the highest ID) it comes back to the beginning (the lowest -form 0)
          Hope it explains what do I want to get.

          Best regards
          Broda
          Last edited by [email protected]; 24 May 2021, 10:38 PM.

          Comment


          • #35
            Hi again,James.
            here is the latest sketch i have used MULTI_GAUGE_BRO1sketch_may09a.ino
            still need help with switching forms.
            On the other hand,Now I see that the needle is "erasing" the background, as Juniel said before. Is there an solution for this?
            And "tha" question.
            As my pixxie LCD-13P2 has no uSD, Is there any possibility to connect a memory card ( maybye via arduino host ) so I could use smart gauges and more stuff that requires more memory like a clock or compass?
            By the way, is SmartGauge the only way to display clock or compassor or weather report etc. etc.
            Best regards
            Broda
            Attached Files
            Last edited by [email protected]; 25 May 2021, 07:39 AM.

            Comment


            • #36
              Hello ,
              heres some fotos of wireing on breadboard
              +5V - +5V
              GND - GND
              RES - 4
              RX - 10
              TX - 11
              pot1(yellow) - A0
              pot2(white) - A1
              pot3(orange) - A2
              button(gray) - A3
              Click image for larger version  Name:	1621887443712.jpg Views:	0 Size:	3.61 MB ID:	75737 Click image for larger version  Name:	1621887443725.jpg Views:	0 Size:	3.51 MB ID:	75738 Click image for larger version  Name:	1621887443731.jpg Views:	0 Size:	2.88 MB ID:	75739
              Last edited by [email protected]; 25 May 2021, 07:35 AM.

              Comment


              • #37
                Hi Broda

                I will take a look at your latest code now and attempt to help.

                Can you please draw the schematic you have of how you have wired up the button, does it have a pull up, or a pull down, or nothing when connecting to the A3 pin of the Arduino?
                What is that resistor I see on the reset pin? How is that connected?

                Regarding the uSD card, no pixxiLCD-13P2 can not have a uSD card, it is not designed for that, it is designed to be run from its flash memory only. You need to use internal and inherent widgets rather than GCI widgets ideally, so things fit inside the memory. You can't connect memory to the Arduino and have any effect on what you are trying to do on the display, unless you change to something like Serial SPE and turn the display in to a full blown slave and send every graphic command over the serial port from the Arduino - however I dont think you will achieve what you are wanting.

                Ill reply again soon, when I have had a look over your code, but I will have to make some assumptions about your button if you dont reply in time.

                Regards
                James

                Comment


                • #38
                  Hi Broda

                  I might have a solution for the wiping of the background with the needle movement without an SD card. Would it be possible to send me your Visi-Genie project so I can take a look.
                  You can zip your Genie project by clicking on File then Zip Project and the zip will be saved in the same folder as your project.

                  Best regards

                  Paul

                  Comment


                  • #39
                    Hi Broda

                    Find attached code for the button changing. Some of your code I commented out at the end for testing.
                    Tested here and working fine.

                    I have enabled internal pullup on pin A3, so no resistor is needed, just directly connect the button to ground and other side of button to pin A3, and it should work.
                    This assumes you have Form0, Form1, Form2, Form3, Form3 and Form5. Just change the variable 'lastForm' to be the number of the last form you have, ie if you have 3 forms, change it to be 3.

                    This debounces the input, so it will only change on the falling edge of the button push. The button is pulled high with the internal pull up by default, so when you push the button it will ground pin A3. You can hold your finger on the button and nothing more than a single form change will happen. Cycles form0 to form5 and back to form0 again, etc.

                    Hope that helps

                    Regards
                    Attached Files
                    James

                    Comment


                    • #40
                      Hi James, this resistor is connected to reset pin

                      Comment


                      • #41
                        Originally posted by pauleilio View Post
                        Hi Broda

                        I might have a solution for the wiping of the background with the needle movement without an SD card. Would it be possible to send me your Visi-Genie project so I can take a look.
                        You can zip your Genie project by clicking on File then Zip Project and the zip will be saved in the same folder as your project.

                        Best regards

                        Paul
                        Hi Paul. here is my project zipped
                        bro displ1.1.zip
                        thanks for help
                        Best regards
                        Broda
                        Attached Files
                        Last edited by [email protected]; 25 May 2021, 10:19 AM.

                        Comment


                        • #42
                          Originally posted by James_4DSystems View Post
                          Hi Broda

                          I will take a look at your latest code now and attempt to help.

                          Can you please draw the schematic you have of how you have wired up the button, does it have a pull up, or a pull down, or nothing when connecting to the A3 pin of the Arduino?
                          What is that resistor I see on the reset pin? How is that connected?

                          Regarding the uSD card, no pixxiLCD-13P2 can not have a uSD card, it is not designed for that, it is designed to be run from its flash memory only. You need to use internal and inherent widgets rather than GCI widgets ideally, so things fit inside the memory. You can't connect memory to the Arduino and have any effect on what you are trying to do on the display, unless you change to something like Serial SPE and turn the display in to a full blown slave and send every graphic command over the serial port from the Arduino - however I dont think you will achieve what you are wanting.

                          Ill reply again soon, when I have had a look over your code, but I will have to make some assumptions about your button if you dont reply in time.

                          Regards
                          If using jumper wires Note that the logic state for resetting the display is reversed if not using any of the 4D Arduino Adaptor Shields. It is now 0 instead of 1. This is because the display module’s RESET pin is directly connected to D4 via a 1kohm resistor. If using a 4D Arduino Adaptor Shield, the display module’s RESET pin is switched by the D4 pin via a transistor.
                          Attached Files
                          Last edited by [email protected]; 25 May 2021, 10:17 AM.

                          Comment


                          • James_4DSystems
                            James_4DSystems commented
                            Editing a comment
                            Yes, already noticed all that in your code and taken into account in my reply in post #39

                        • #43
                          Click image for larger version

Name:	Sin título1.jpg
Views:	69
Size:	566.7 KB
ID:	75751

                          Comment


                          • #44
                            Originally posted by James_4DSystems View Post
                            Hi Broda

                            Find attached code for the button changing. Some of your code I commented out at the end for testing.
                            Tested here and working fine.

                            I have enabled internal pullup on pin A3, so no resistor is needed, just directly connect the button to ground and other side of button to pin A3, and it should work.
                            This assumes you have Form0, Form1, Form2, Form3, Form3 and Form5. Just change the variable 'lastForm' to be the number of the last form you have, ie if you have 3 forms, change it to be 3.

                            This debounces the input, so it will only change on the falling edge of the button push. The button is pulled high with the internal pull up by default, so when you push the button it will ground pin A3. You can hold your finger on the button and nothing more than a single form change will happen. Cycles form0 to form5 and back to form0 again, etc.

                            Hope that helps

                            Regards

                            Hello James
                            thank You for help
                            after some fighting it aparently works .
                            I had some dificulties, or it was switching forms or it was reading (displaying changing values)
                            after little "tuning" it works,the switching form to form goes a bit rough but goes.
                            Could that be caused by poor power suply (comp USB) ?
                            I ´ll try to power it separately. I attach "tuned" sketch ,see if I did not commited some crimes

                            Thanks again
                            Best regards
                            Broda

                            MULTI_GAUGE_BRO1sketch_may09a.ino




                            Comment


                            • #45
                              Originally posted by James_4DSystems View Post
                              Hi Broda

                              Regarding the uSD card, no pixxiLCD-13P2 can not have a uSD card, it is not designed for that, it is designed to be run from its flash memory only. You need to use internal and inherent widgets rather than GCI widgets ideally, so things fit inside the memory. You can't connect memory to the Arduino and have any effect on what you are trying to do on the display, unless you change to something like Serial SPE and turn the display in to a full blown slave and send every graphic command over the serial port from the Arduino - however I dont think you will achieve what you are wanting.
                              Hello again James,
                              any suggesions where could I find some more info or examples for Serial SPE and "something like Serial SPE and turn the display in to a full blown slave"?
                              I just would love to have clock(watch) in this project

                              Best regards
                              Broda

                              Comment

                              Working...
                              X