💬 Using Arduino


  • Admin

    This thread contains comments for the article "Using Arduino" posted on MySensors.org.



  • Hi, just to let you know MySensors libraries don't seem to be found in Arduino IDE build 1.6.12


  • Mod

    @doug could you clarify what you mean?
    Are you unable to install the MySensors library? if so, what did you do and what message did you get?



  • I think that Doug means that if you go to Sketch -> Include Library -> Manage Libraries... and enter MySens into the search box there is NO MySensor library to be included.
    Just found that out myself. Downloaded the 1.6.12 IDE and installed it on a "clean" mac OS X system.



  • I test it now and have the same Problem. The Arduino IDE shows no MySens or MySensors Library to add. And so i can't use this. Can anybody help?



  • As a work around I downloaded the zip file from: https://www.mysensors.org/download and added it with Sketch -> Add Library -> Add .ZIP Library. select the downloaded zip file.
    If you are done you can find the MySensors Library in the Sketch -> Add Library drop down list under Contributed Libraries.


  • Admin

    It seems that mysensors library is missing in arduino library manager..

    I have filed an issue with arduino on github, so hopefully we will get it solved



  • Using Arduino IDE 1.6.2, no problem compiling MySensors/AltSoftwareSerial/Test/test.ino. Had to make two changes: add some #defines and include an extra library. I'm using a Nordic nRF24L01+ on a Chinese board. I had to add:

    #define MY_RADIO_NRF24
    #define MY_RF24_PA_LEVEL RF24_PA_LOW
    #define MY_GATEWAY_SERIAL

    before

    #include <MySensors.h>

    Also, had to add the AltSofwareSerial library, otherwise I received the error "AltSoftSerial.h: No such file or directory".

    If I don't follow up with a new comment it means that this config worked. I'm on Windows 10, using a fakeduino Uno, hoping to connect to an nRF24LE1 over 250Kbps.

    and MySensors libraries. A



  • couldn't get nRF24L01+ to work. Making do with two nRF24LE1s communicating with each other.



  • Would be nice to have a link to the example sketches (the ones using external libraries) here: https://github.com/mysensors/MySensorsArduinoExamples


  • Mod

    Thanks for the suggestion @mpp. I have added a section for the external examples.



  • So this is going to cause an argument in the sketch?:
    void loop()
    {
    // This will be called contentiously after setup.
    }

    Maybe should be "continuously"



  • Why do i get this error? Any idea how to fix it?
    Arduino: 1.6.5 (Windows 8.1), Board: "Arduino Uno"

    In file included from C:\Users\Audrey\Documents\Arduino\libraries\MySensors/drivers/RF24/RF24.cpp:23:0,
    from C:\Users\Audrey\Documents\Arduino\libraries\MySensors/MySensors.h:290,
    from GatewayW5100.ino:116:
    C:\Users\Audrey\Documents\Arduino\libraries\MySensors/drivers/RF24/RF24.h:37:17: fatal error: SPI.h: No such file or directory
    #include <SPI.h>
    ^
    compilation terminated.
    Error compiling.

    This report would have more information with
    "Show verbose output during compilation"
    enabled in File > Preferences.



  • Messing around with it and got this message, still not idea how to fix it

    Arduino: 1.6.5 (Windows 8.1), Board: "Arduino Uno"

    Using library MySensors in folder: C:\Users\Audrey\Documents\Arduino\libraries\MySensors

    Using library Ethernet in folder: C:\Program Files (x86)\Arduino\libraries\Ethernet

    C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10605 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard -IC:\Users\Audrey\Documents\Arduino\libraries\MySensors -IC:\Program Files (x86)\Arduino\libraries\Ethernet\src C:\Users\Audrey\AppData\Local\Temp\build1062139905146989693.tmp\GatewayW5100.cpp -o C:\Users\Audrey\AppData\Local\Temp\build1062139905146989693.tmp\GatewayW5100.cpp.o

    In file included from GatewayW5100.ino:2:0:
    C:\Users\Audrey\Documents\Arduino\libraries\MySensors/MySensors.h:328:2: error: #error No forward link or gateway feature activated. This means nowhere to send messages! Pretty pointless.
    #error No forward link or gateway feature activated. This means nowhere to send messages! Pretty pointless.
    ^
    Error compiling.


  • Mod

    @Newzwaver could you post the sketch?



  • Thank you for your help, the thing is working. It has something to do with the way I have the Arduino software setup, for some reason I can't just copy a sketch and paste it in for a new sketch.



  • The MySensors library is missing from the arduino library manager again. Should I just log a new issue and reference the previous one?


  • Mod

    @benji_lb yes please do. Could you post the link to the issue here when it has been created so we can follow it?





  • @benji_lb
    Fixed. I noticed I was running an older version of the software. Uninstalled completely and reinstalled, worked fine.

    Where would be the best place for an Arduino newbie to post to get some assistance? I'm looking at Gateways and i'm unsure which direction to take, and where would be best to post. Would this be OK? https://forum.mysensors.org/category/13/development


  • Mod

    @benji_lb great, thanks for reporting back.

    The development category will be good. Big welcome to the MySensors community 🙂



  • Today, the "Basic Structure" section contains just a "normal" Arduino structure.
    Wouldn't it be useful to also add a slightly extended version mentioning the split of the original Arduino-setup() to begin()->presentation()->setup() when using recent MySenors libs (since 2.1.0)?
    This is not very transparent to quite a few users, and yet some of our examples do either not mention "before()" at all or do not make use of the new logical execution time of setup(), even if this would be helpful (!pcReceived in WaterMeter-Sketch, getControllerConfig(), for metric in Temperature, just to mention some examples) .
    Also the text order of setup() still beeing above presentation() in at least some examples may be technically irrelevant but nevertheless misleading to some extend.


  • Mod

    @rejoe2 great feedback, thanks! For the examples, I have created https://github.com/mysensors/MySensors/issues/927

    I have updated the "Using Arduino " page. I am not 100% sure I got it right and easy to understand so feedback is very welcome.



  • @mfalkvidd
    Your understanding of my suggestion seems to be 100% correct. I will add some additional comments and some (too complicated but working examples) as links at the github page.



  • Hi there,
    I am on Linux - exclusively! Does that mean I am out even before I started?
    3nibble (puzzled)


  • Hardware Contributor

    You're not !
    I'm also exclusively on linux, and I use MySensors !
    I was using Arduino IDE, and now I'm using atom.io, but both are working on linux !



  • hi i am using Lora SX1276 as simple transmitter and receiver.
    is there any library for sending and receiving the data no gateway involved only simple data transmission and reception.


Log in to reply
 

Suggested Topics

  • 3
  • 110
  • 347
  • 109
  • 164
  • 584

17
Online

11.4k
Users

11.1k
Topics

112.7k
Posts