Announcement

Collapse
No announcement yet.

Analog calculations

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

    Analog calculations

    I have started to experiment with analog input calculations and found 2 issues.

    1.
    If I try to use brackets in the calculations like this : (Value-120)*100/850
    Then I get this error:

    Arduino Plugin Exception in RecievedText: Conversion from string "" to type 'Double' is not valid.

    2.
    If I try to change the unit and put back "%" - then it displays "%25" instead of only "%".

    (I'm using Norwegian keyboard settings, but English(europe) regional settings.)

    #2
    Originally posted by Toby View Post
    I have started to experiment with analog input calculations and found 2 issues.

    1.
    If I try to use brackets in the calculations like this : (Value-120)*100/850
    Then I get this error:

    Arduino Plugin Exception in RecievedText: Conversion from string "" to type 'Double' is not valid.

    2.
    If I try to change the unit and put back "%" - then it displays "%25" instead of only "%".

    (I'm using Norwegian keyboard settings, but English(europe) regional settings.)
    what plugin version are you using?

    I have a new version that is in testing to fix lots of calculation bugs on the Analog inputs.

    Greig.

    Sent from my SM-G925F using Tapatalk
    Zwave = Z-Stick, 3xHSM100� 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
    X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
    Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
    Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
    Scripts =
    Various

    Comment


      #3
      I'm using 1.0.0.36

      Sent fra min E6653 via Tapatalk

      Comment


        #4
        OK I would suggest using the beta that is I the updater. All of the above should be fixed in it. I will be rolling this up the the release soon.
        Please check the IDE version you are using with this to and update the libraries.

        Greig.

        Sent from my SM-G925F using Tapatalk
        Zwave = Z-Stick, 3xHSM100� 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
        X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
        Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
        Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
        Scripts =
        Various

        Comment


          #5
          I manage to some how get what I want by removing the brackets. although the calculation is not correct mathematically I achieved what I wanted.
          Although without "%"

          Anyway, I did try the latest beta 103. but compiling the code returned error:


          Code:
          C:\Users\HSuser\Documents\Arduino\HomeseerBoard2\HomeseerBoard2.ino:16:17: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
          
           char* Version = "1.0.0.101";
          
                           ^
          
          C:\Users\HSuser\Documents\Arduino\HomeseerBoard2\HomeseerBoard2.ino: In function 'void InputCheck()':
          
          C:\Users\HSuser\Documents\Arduino\HomeseerBoard2\HomeseerBoard2.ino:89:19: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
          
                   Send(" I ");
          
                             ^
          
          C:\Users\HSuser\Documents\Arduino\HomeseerBoard2\HomeseerBoard2.ino:91:17: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
          
                   Send(" ");  
          
                           ^
          
          C:\Users\HSuser\Documents\Arduino\HomeseerBoard2\HomeseerBoard2.ino: In function 'void AnalogueCheck()':
          
          C:\Users\HSuser\Documents\Arduino\HomeseerBoard2\HomeseerBoard2.ino:121:21: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
          
                     Send(" A ");
          
                               ^
          
          C:\Users\HSuser\Documents\Arduino\HomeseerBoard2\HomeseerBoard2.ino:123:19: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
          
                     Send(" ");  
          
                             ^
          
          C:\Users\HSuser\Documents\Arduino\HomeseerBoard2\HomeseerBoard2.ino: In function 'void OneWireCheck()':
          
          C:\Users\HSuser\Documents\Arduino\HomeseerBoard2\HomeseerBoard2.ino:187:25: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
          
                       Send(" Rom ");
          
                                   ^
          
          C:\Users\HSuser\Documents\Arduino\HomeseerBoard2\HomeseerBoard2.ino:190:54: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
          
                         if (tempDeviceAddress[i] < 16) Send("0");
          
                                                                ^
          
          C:\Users\HSuser\Documents\Arduino\HomeseerBoard2\HomeseerBoard2.ino:193:21: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
          
                       Send(" ");
          
                               ^
          
          C:\Users\HSuser\Documents\Arduino\HomeseerBoard2\HomeseerBoard2.ino: In function 'void DataEvent()':
          
          C:\Users\HSuser\Documents\Arduino\HomeseerBoard2\HomeseerBoard2.ino:417:19: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
          
                   Send(" I ");
          
                             ^
          
          C:\Users\HSuser\Documents\Arduino\HomeseerBoard2\HomeseerBoard2.ino:419:17: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
          
                   Send(" ");
          
                           ^
          
          C:\Users\HSuser\Documents\Arduino\HomeseerBoard2\HomeseerBoard2.ino:428:22: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
          
                 Send("Version ");
          
                                ^
          
          C:\Users\HSuser\Documents\Arduino\HomeseerBoard2\HomeseerBoard2.ino:430:15: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
          
                 Send(" ");
          
                         ^
          
          C:\Users\HSuser\Documents\Arduino\HomeseerBoard2\HomeseerBoard2.ino:432:18: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
          
                 Send(" HS3");
          
                            ^
          
          C:\Users\HSuser\Documents\Arduino\HomeseerBoard2\HomeseerBoard2.ino:435:24: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
          
                 Send("Connected ");
          
                                  ^
          
          C:\Users\HSuser\Documents\Arduino\HomeseerBoard2\HomeseerBoard2.ino:563:20: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
          
                 Send("Alive ");
          
                              ^
          
          C:\Users\HSuser\Documents\Arduino\HomeseerBoard2\HomeseerBoard2.ino:589:23: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
          
                 Send("Reseting ");
          
                                 ^
          
          C:\Users\HSuser\Documents\Arduino\libraries\LiquidCrystal_I2C\I2CIO.cpp:35:26: fatal error: ../Wire/Wire.h: No such file or directory
          
           #include <../Wire/Wire.h>
          
                                    ^
          
          compilation terminated.
          
          exit status 1
          Error compiling for board Arduino/Genuino Uno.
          the final error code claims wire.h is missing. In library manager the wire library is said to be installed but I cannot find wire.h anywhere. especially not as part of the libraries distributed with the plugin.

          Comment


            #6
            are you using Arduino IDE V1.6.8?

            Greig.
            Zwave = Z-Stick, 3xHSM100� 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
            X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
            Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
            Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
            Scripts =
            Various

            Comment


              #7
              Originally posted by enigmatheatre View Post
              are you using Arduino IDE V1.6.8?
              No, I was not. Downgraded now and retried. but still get the same error.

              the 1.0.0.36 code works fine (besides some warnings)

              Comment


                #8
                Originally posted by Toby View Post
                No, I was not. Downgraded now and retried. but still get the same error.

                the 1.0.0.36 code works fine (besides some warnings)
                OK As I said in post #4 you need to check the IDE and libraries you are using as they have changed from V1.0.0.36.

                If you get stuck again give me a shout.

                Greig.
                Zwave = Z-Stick, 3xHSM100� 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
                X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
                Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
                Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
                Scripts =
                Various

                Comment


                  #9
                  Originally posted by enigmatheatre View Post
                  OK As I said in post #4 you need to check the IDE and libraries you are using as they have changed from V1.0.0.36.
                  I'm now using .8 and libraries from .103, but I still get the errors.

                  Comment


                    #10
                    That is strange. I have just updater the beta to .110. Please try that and see if it helps.

                    Greig.
                    Zwave = Z-Stick, 3xHSM100� 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
                    X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
                    Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
                    Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
                    Scripts =
                    Various

                    Comment


                      #11
                      I saw that the file where this was referenced was not part of the latest library.zip so i tried to edit the file and removed ../wire/ and left include "wire.h" in I2CIO.cpp in the LiquidCrystal_I2C folder.

                      that did the trick and the sketch is now compiling.

                      Thanks!

                      Comment

                      Working...
                      X