Announcement

Collapse
No announcement yet.

Winbutton/ Visi Genie Arduino Help

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

  • #31
    what about negative vallues? i see negative values but maybe thats because nothing is connected to my analog ports. anyways ill upload something soon and you can try it out

    Comment


    • #32
      workshop and arduino sketches, you'll notice that the winbuttons are set to momentary "No", not "Both". This is the way for how I make your sketch work properly by actually setting the button state to exactly the state of the relay pin.
      Attached Files
      Last edited by tonton81; 13th February 2017, 08:14 AM.

      Comment


      • #33
        Originally posted by tonton81 View Post
        workshop and arduino sketches, you'll notice that the winbuttons are set to momentary "No", not "Both". This is the way for how I make your sketch work properly by actually setting the button state to exactly the state of the relay pin.
        You sir are a genius!!! still some problems but i think we can fix those easy!!!

        Comment


        • #34
          As for the the issues...
          no need for negative values.
          temperature is working and displaying correctly.
          the PSI is not....the values are all over the place ranging from -20 to 10
          I believe that is why I had the float function in there...something about taking average readings.

          Comment


          • #35
            OH WAIT the data was disconnected from the sensor! let me fix that

            Comment


            • #36
              PERFECT!!!!! it works!!!!!!!

              Comment


              • #37
                yes in the loop you need to correct your values, i dont really have your equipment to test with, but the rest should be okay. the LCD only accepts ints so if your sending it a float, put an (int) before it

                the eventhandler is pretty clean now, using toggling and button state

                Comment


                • #38
                  Spoke too soon...the relay pin 52 is not coming high when pressure is less than 5

                  Comment


                  • #39
                    thats impossible as this is triggered endlessly:

                    Code:
                      if (psi < 5) digitalWrite(ledPin, HIGH);
                      else digitalWrite(ledPin, LOW);
                    are you sure psi is dropping below 5? has to be 4 or lower

                    Comment


                    • #40
                      Originally posted by tonton81 View Post
                      thats impossible as this is triggered endlessly:

                      Code:
                       if (psi < 5) digitalWrite(ledPin, HIGH);
                      else digitalWrite(ledPin, LOW);
                      are you sure psi is dropping below 5? has to be 4 or lower
                      Yes im sure... PSI is 0. I even tried to blow air into sensor to raise the pressure to 14 to see if it was reversed, with no avail

                      Comment


                      • #41
                        Sorry had it plugged into wrong pin ((( Im an idiot lol

                        Comment


                        • #42
                          Code:
                            pinMode(52, OUTPUT);
                          should be
                          Code:
                            pinMode(ledPin, OUTPUT);
                          in setup.
                          Then, at the top, change:
                          Code:
                          const int ledPin = 52; // Solenoid Relay pin
                          to:
                          Code:
                          const int ledPin = 13; // Solenoid Relay pin
                          i tested with the mega built in led and its running fine, so check your pin 52 make sure it's wired properly (diodes, resistors, etc)

                          Comment


                          • #43
                            well you already answered lol

                            Comment


                            • #44
                              here is a copy of the timer arduino code using button. the 4d code and the win button I was attempting to get working on its own.
                              Regards Anthony
                              Attached Files

                              Comment


                              • #45
                                Originally posted by sole69r View Post
                                here is a copy of the timer arduino code using button. the 4d code and the win button I was attempting to get working on its own.
                                Regards Anthony
                                I believe there is an issue with the link for stopwatch zip. there is nothing to download

                                Comment


                                • James_4DSystems
                                  James_4DSystems commented
                                  Editing a comment
                                  All 3 are downloading fine here - maybe try refreshing your browser. Be sure you are logged in, then refresh. If you get a white screen, refresh the page and it should start downloading. Your browser has likely cached the page when you were not logged in.

                                • sole69r
                                  sole69r commented
                                  Editing a comment
                                  I'm unsure the code should be fine I am aware that the baud rates may need to be changed but between the 4d systems display and the Arduino object example. I have tried testing different baud rates hence why they may not be matching. have you had the chance to look at my code james I have no clue why the win buttons will not work id imagine it is a small step that I am missing. I notice that when the button is pressed it does not change on the display I have it set to change colours when on and off.
                                  Last edited by sole69r; 17th February 2017, 07:18 PM.
                              Working...
                              X