Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. My Project
  3. Sensebender Micro + button

Sensebender Micro + button

Scheduled Pinned Locked Moved My Project
sensebendersensebender micbutton
27 Posts 5 Posters 13.4k Views 8 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Pierre PP Pierre P

    If I undefine: //#define BATT_SENSOR 199
    it's working.
    But your code still not 100% so we have to find why.
    But... but, i think i'm making a mistake: yes i plan to use 3volts power. But, i don't want it as a sensor ! I wan't it as a battery level like the very first SensebenderMicro sketch. So... I have to undefine BATT_SENSOR ? And i will not have it set to 3Vcc=100% ?
    0_1453547060579_jeedom-004.png

    iotcrazyI
    iotcrazyI
    iotcrazy
    wrote on last edited by
    #21

    @Pierre-P you controller image looks great . What controller is it ?

    Pierre PP 1 Reply Last reply
    0
    • iotcrazyI iotcrazy

      @Pierre-P you controller image looks great . What controller is it ?

      Pierre PP
      Pierre PP
      Pierre P
      wrote on last edited by
      #22

      @iotcrazy It is Jeedom, you can find some information here: http://www.mysensors.org/controller/jeedom
      It use an RPI2 if you ant to make it yourself, and a major version will come during the week !

      No quote, no forum notification (else, the mail box ring every minutes !). Thanks, and have a very good MySensors day !

      1 Reply Last reply
      0
      • alexsh1A
        alexsh1A
        alexsh1
        wrote on last edited by
        #23

        @martinhjelmare Any idea why siVolt is reporting values rounding up to either 2V or 3V in Domoticz? All I'd like to have is something like 2.9V

        martinhjelmareM 1 Reply Last reply
        0
        • alexsh1A alexsh1

          @martinhjelmare Any idea why siVolt is reporting values rounding up to either 2V or 3V in Domoticz? All I'd like to have is something like 2.9V

          martinhjelmareM
          martinhjelmareM
          martinhjelmare
          Plugin Developer
          wrote on last edited by martinhjelmare
          #24

          @alexsh1

          How are you calculating and sending it? Did you change to float? There was a bug in my original sketch.

          Make sure at least one of the operands is a float in the division.

          float siVolt = vcc / 1000.0;
          
          alexsh1A 1 Reply Last reply
          0
          • martinhjelmareM martinhjelmare

            @alexsh1

            How are you calculating and sending it? Did you change to float? There was a bug in my original sketch.

            Make sure at least one of the operands is a float in the division.

            float siVolt = vcc / 1000.0;
            
            alexsh1A
            alexsh1A
            alexsh1
            wrote on last edited by
            #25

            @martinhjelmare

            Yes, it is declared as float

            void sendBattLevel(bool force)
            {
              if (force) lastBattery = -1;
              long vcc = readVcc();
              if (vcc != lastBattery) {
                lastBattery = vcc;
              float siVolt = vcc / 1000;
            #ifdef BATT_SENSOR
                gw.send(msgBatt.set(siVolt, 2));
            #endif
            

            It is reported as either 2.000V (battery) or 3.000V (USB) in Domoticz
            Changing siVolt to int or changing 2 in set does not change anything.

            martinhjelmareM 1 Reply Last reply
            0
            • alexsh1A alexsh1

              @martinhjelmare

              Yes, it is declared as float

              void sendBattLevel(bool force)
              {
                if (force) lastBattery = -1;
                long vcc = readVcc();
                if (vcc != lastBattery) {
                  lastBattery = vcc;
                float siVolt = vcc / 1000;
              #ifdef BATT_SENSOR
                  gw.send(msgBatt.set(siVolt, 2));
              #endif
              

              It is reported as either 2.000V (battery) or 3.000V (USB) in Domoticz
              Changing siVolt to int or changing 2 in set does not change anything.

              martinhjelmareM
              martinhjelmareM
              martinhjelmare
              Plugin Developer
              wrote on last edited by
              #26

              @alexsh1 said:

              float siVolt = vcc / 1000;
              

              You should change 1000 to 1000.0, i.e. a float. Float math will be used if any of the operands is a float.
              https://www.arduino.cc/en/Reference/Arithmetic

              1 Reply Last reply
              0
              • alexsh1A
                alexsh1A
                alexsh1
                wrote on last edited by
                #27

                @martinhjelmare Stupid me! Thanks for bringing this up - these issues are so simple, but very easy to overlook. I was about to start pulling my hair out....

                1 Reply Last reply
                0

                Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                With your input, this post could be even better 💗

                Register Login
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                13

                Online

                12.4k

                Users

                11.2k

                Topics

                113.4k

                Posts


                Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • MySensors
                • OpenHardware.io
                • Categories
                • Recent
                • Tags
                • Popular