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. Development
  3. MySensor.h conflict with RF24.h?

MySensor.h conflict with RF24.h?

Scheduled Pinned Locked Moved Development
7 Posts 2 Posters 2.2k 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.
  • y4CdW42Ol8Y Offline
    y4CdW42Ol8Y Offline
    y4CdW42Ol8
    wrote on last edited by
    #1

    My goal is simply to Xmit the battery voltage and moisture sensor data from one Pro Mini (with RF24) to another Pro Mini (also with a RF24 radio), not using gw calls. My receiving Pro Mini will simply control a relay.

    I'm trying to combine two example sketches:

    • Plant_Moisture_Sensor_Low_Power
    • Arduino RF24XmitExample

    #include <SPI.h>
    #include <MySensor.h>
    #include "RF24.h"

    However, I'm getting compile errors. There seems to be a conflict between the MySensor gw library calls and the RF24 library calls.

    The first of many compile errors I get are:
    C:\Users\Dieter\AppData\Local\Temp\build3316808d9e952884aa2dded546ad6403.tmp\libraries\RF24\RF24.cpp.o: In function `SPIClass::setBitOrder(unsigned char)':

    C:\Users\Dieter\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.11\libraries\SPI\src/SPI.h:293: multiple definition of `RF24::csn(bool)'

    In the end, I get: Exit status 1
    Error compiling for board Arduino Pro or Pro Mini.

    Both examples individually compile OK.

    Any thoughts?
    Dieter

    1 Reply Last reply
    0
    • y4CdW42Ol8Y Offline
      y4CdW42Ol8Y Offline
      y4CdW42Ol8
      wrote on last edited by
      #2

      I forgot to mention I only use the gw libary to put the 3.3v Mini to sleep.

      1 Reply Last reply
      0
      • mfalkviddM Offline
        mfalkviddM Offline
        mfalkvidd
        Mod
        wrote on last edited by
        #3

        Using both rf24 and MySensors will not work.

        If you only need sleep, the rocketscream lowpower library will probably be a better choice (except that it won't put the radio to sleep I think so you'll need to handle that separately.

        1 Reply Last reply
        0
        • y4CdW42Ol8Y Offline
          y4CdW42Ol8Y Offline
          y4CdW42Ol8
          wrote on last edited by
          #4

          When using the GW library, is there a way to communicate from one node to another, without having to go thru a controller?

          I have read some of the 1.5 API, but I cant really tell if this can be done.

          What about the LowPower.h library. Does it put the Radio to sleep?

          mfalkviddM 1 Reply Last reply
          0
          • y4CdW42Ol8Y Offline
            y4CdW42Ol8Y Offline
            y4CdW42Ol8
            wrote on last edited by
            #5

            What can i use to create an interrupt to wake a sleeping Arduino?
            This using your Plant_Moisture_Sensor sketch.

            mfalkviddM 1 Reply Last reply
            0
            • y4CdW42Ol8Y y4CdW42Ol8

              When using the GW library, is there a way to communicate from one node to another, without having to go thru a controller?

              I have read some of the 1.5 API, but I cant really tell if this can be done.

              What about the LowPower.h library. Does it put the Radio to sleep?

              mfalkviddM Offline
              mfalkviddM Offline
              mfalkvidd
              Mod
              wrote on last edited by
              #6

              @y4CdW42Ol8 said:

              When using the GW library, is there a way to communicate from one node to another, without having to go thru a controller?

              I have read some of the 1.5 API, but I cant really tell if this can be done.

              Yes. Use setDestination on the message, see https://www.mysensors.org/download/sensor_api_15#the-full-api

              What about the LowPower.h library. Does it put the Radio to sleep?

              To my knowledge, LowPower.h is the rocketscream lowpower library. So no, it does not.

              1 Reply Last reply
              0
              • y4CdW42Ol8Y y4CdW42Ol8

                What can i use to create an interrupt to wake a sleeping Arduino?
                This using your Plant_Moisture_Sensor sketch.

                mfalkviddM Offline
                mfalkviddM Offline
                mfalkvidd
                Mod
                wrote on last edited by
                #7

                @y4CdW42Ol8 said:

                What can i use to create an interrupt to wake a sleeping Arduino?
                This using your Plant_Moisture_Sensor sketch.

                A timer (whick my sketch alreay uses) or a change in an interrupt pin, see the Sleeping section on https://www.mysensors.org/download/sensor_api_15#the-full-api and http://playground.arduino.cc/Code/Interrupts

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


                25

                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