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. Troubleshooting
  3. Relay with button

Relay with button

Scheduled Pinned Locked Moved Troubleshooting
7 Posts 2 Posters 1.6k Views 2 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.
  • LanmanL Offline
    LanmanL Offline
    Lanman
    wrote on last edited by
    #1

    Does anyone have an updates sketch for the relay with button that works on the current library?

    1 Reply Last reply
    0
    • korttomaK Offline
      korttomaK Offline
      korttoma
      Hero Member
      wrote on last edited by korttoma
      #2

      Have you checked from GitHub?

      Updated examples allong with some external librarys are available from here -> https://github.com/mysensors/MySensorsArduinoExamples

      Relay with button sketch is here -> https://github.com/mysensors/MySensorsArduinoExamples/tree/master/examples/RelayWithButtonActuator

      • Tomas
      1 Reply Last reply
      0
      • LanmanL Offline
        LanmanL Offline
        Lanman
        wrote on last edited by
        #3

        Hi, thanks for the reply, by the looks of it this is the same sketch on the my sensors site, unfortunately it doesn't seem to work on the new library, unless that is just me doing something retarded.

        korttomaK 1 Reply Last reply
        0
        • LanmanL Lanman

          Hi, thanks for the reply, by the looks of it this is the same sketch on the my sensors site, unfortunately it doesn't seem to work on the new library, unless that is just me doing something retarded.

          korttomaK Offline
          korttomaK Offline
          korttoma
          Hero Member
          wrote on last edited by
          #4

          @Lanman said:

          doesn't seem to work

          Can you elaborate on this? What is it that is not working? Can you get the serial debug output from your node?

          // Enable debug prints
          #define MY_DEBUG
          
          • Tomas
          1 Reply Last reply
          2
          • LanmanL Offline
            LanmanL Offline
            Lanman
            wrote on last edited by
            #5

            It won't even upload to the arduino,

            It works if you use the old library but on v 2.0 this is the result.

            C:\Users\Shane\AppData\Local\Temp\ccwaR9Zf.ltrans2.ltrans.o: In function `loop':

            ccwaR9Zf.ltrans2.o:(.text+0x8): undefined reference to `Bounce::update()'

            ccwaR9Zf.ltrans2.o:(.text+0x10): undefined reference to `Bounce::read()'

            C:\Users\Shane\AppData\Local\Temp\ccwaR9Zf.ltrans2.ltrans.o: In function `setup':

            ccwaR9Zf.ltrans2.o:(.text+0x9e): undefined reference to `Bounce::attach(int)'

            ccwaR9Zf.ltrans2.o:(.text+0xaa): undefined reference to `Bounce::interval(unsigned int)'

            C:\Users\Shane\AppData\Local\Temp\ccwaR9Zf.ltrans3.ltrans.o: In function `global constructors keyed to 65535_0_relay_button1.ino.cpp.o.2246':

            ccwaR9Zf.ltrans3.o:(.text.startup+0x64): undefined reference to `Bounce::Bounce()'

            collect2.exe: error: ld returned 1 exit status

            Multiple libraries were found for "MySensors.h"
            Used: D:\Data\Documents\Arduino\libraries\MySensors
            Not used: C:\Program Files (x86)\Arduino\libraries\MySensors-master
            exit status 1
            Error compiling for board Arduino Nano.

            1 Reply Last reply
            0
            • korttomaK Offline
              korttomaK Offline
              korttoma
              Hero Member
              wrote on last edited by
              #6

              @Lanman said:

              Multiple libraries were found for "MySensors.h"
              Used: D:\Data\Documents\Arduino\libraries\MySensors
              Not used: C:\Program Files (x86)\Arduino\libraries\MySensors-master

              Looks like you just have some issues with your libraries.

              Seems like you have 2 instances of the MySensors library installed in 2 different locations. Maybe you should delete or move the one you are not using to another location.

              Also the Bounce2 library is not included in the MySensors 2.0 library so you need to install it separately if it is missing.
              You can collect the Bounce2 library from this collection -> https://github.com/mysensors/MySensorsArduinoExamples

              • Tomas
              1 Reply Last reply
              2
              • LanmanL Offline
                LanmanL Offline
                Lanman
                wrote on last edited by
                #7

                Just as I suspected, it was me doing something retarded, thanks for your help.

                1 Reply Last reply
                1
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                18

                Online

                11.7k

                Users

                11.2k

                Topics

                113.1k

                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