Skip to content

Development

Discuss Arduino programming, library tips, share example sketches and post your general programming questions.
1.5k Topics 13.5k Posts

Subcategories


  • 56 578
    56 Topics
    578 Posts
    HJ_SKH
    Hi2All! Surprising is here. After about 24hours I refresh HA and suddenly my motion sensor was integrated. There is also second entity > battery : 0 , have to look deeper into that for understanding. Need to change little in the sketch, because don't want every short time 'no movement' so only when there is motion and maybe once a hour indication sensor is alive. Meantime I found 3 other good threats: https://forum.mysensors.org/topic/11200/finally-progress-evidence-based-radio-testing-method-and-capacitors https://forum.mysensors.org/topic/1664/which-are-the-best-nrf24l01-modules/27 https://forum.mysensors.org/topic/9550/build-a-reliable-power-supply-chain Very usefull for me also finally progress because of lacking time in the past. Great jobs are done here! Thanks for this all of you guys or girls!
  • Repeater Node and DHT11

    7
    0 Votes
    7 Posts
    1k Views
    W
    I'm not sure whats happened... But i think its working now. I try to investigate why it works now! If i find the reason i will post here. Thanks for help.
  • HM-10 BLE node SoftSerial issues

    1
    0 Votes
    1 Posts
    503 Views
    No one has replied
  • How to tell if mysensors library starts up successfully?

    7
    0 Votes
    7 Posts
    2k Views
    Lars DeutschL
    @boots33 said in How to tell if mysensors library starts up successfully?: #define MY_TRANSPORT_WAIT_READY_MS 3000 Hi, thank you very much ! I am using the latest 2.2.rc2 version. Will give the preprocessor statement above a try ... thank you very much, Lars
  • Multiple motion/door sketch

    2
    2 Votes
    2 Posts
    1k Views
    rejoe2R
    @bluezr1 Good progress! In case you are interested in how to shorten this kind of code and be more flexible in assigning PINs, you may have a look at this post here: https://forum.mysensors.org/topic/4847/multi-button-relay-sketch/33# by @korttoma Just delete the relay part...
  • Adaptive sleep time

    7
    0 Votes
    7 Posts
    1k Views
    mfalkviddM
    @gohan so it's actually you who needs a set sleep time based on energy levels? ;-)
  • gateway serial and dimmer example

    23
    0 Votes
    23 Posts
    3k Views
    M
    (if some one can explain how Insert Code Here works, that could be fine too... no laughs please!
  • Support for SI4432 chips

    2
    0 Votes
    2 Posts
    743 Views
    tbowmoT
    @pmat There is no driver for the radio, so someone needs to write that. Currently it is not on the roadmap to support other radio chipsets than Nordic and Hope RF. But if you see a need for it, then we are willing to look at PR's that include new radios. :)
  • I_LOG_MESSAGE & OTALogPrint()

    1
    0 Votes
    1 Posts
    465 Views
    No one has replied
  • Ethernet Gateway debug to LCD

    10
    0 Votes
    10 Posts
    2k Views
    W
    @dbemowsk Nah it's better, I run around with a Surface tablet and look like I'm on %random_forensic_crime_drama% How much more Hollywood can one get? I did split the serial and send it both to the NodeMCU and the TFT screen, but the TFT kept missing lines as it couldn't keep up (rather the Arduino Pro Mini couldn't keep up) so while it'd look nice, was useless for debugging purposes.
  • Gateway echoing to specific node

    2
    0 Votes
    2 Posts
    535 Views
    mfalkviddM
    @boozz node-red can forward the serial data to any number of places. Domoticz, log file on the rpi, tcp and more. See https://forum.mysensors.org/post/79671 for some nodered references.
  • LogOTANode & LogOTAGateway

    1
    0 Votes
    1 Posts
    539 Views
    No one has replied
  • Setting up my Arduinos & Raspberry

    4
    1
    0 Votes
    4 Posts
    862 Views
    gohanG
    The data are printed on the serial port as you should have noticed with the mysensors protocol. You can run multiple controllers but I don't think you can use serial gateway, you need an ethernet gateway. You can wire the radio directly on the rpi and compile the ethernet gateway (just follow the guide). Given you are new I'd start from an easier controller than Openhab
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • Debug to a sd-card module?

    Locked
    28
    0 Votes
    28 Posts
    6k Views
    sundberg84S
    Please use this thread for further discussion: https://forum.mysensors.org/topic/8040/the-logger-machine-short-and-long-term-serial-logging
  • Cant get the data in serial monitor in serial gateway from a sensor node

    6
    0 Votes
    6 Posts
    888 Views
    rejoe2R
    @sachin-rana said in Cant get the data in serial monitor in serial gateway from a sensor node: @rejoe2 ok i will use raspberry pi but i want to send data on the cloud server ,via http post request plz help me i want to send node sensor data to cloud firebase Sorry, but I'm complete noob in http protocols - this is why I like MySensors and serial GW's. Additionally I also dislike the idea to have personal data made available outside my own network sphere, so I don't have any experience here either. You may use MQTT (LAN or WIFI-GW) as a protocoll to get things "in the cloud" or the means provided by your controller.
  • Can a Node subscribe to messages from another node?

    4
    0 Votes
    4 Posts
    745 Views
    rejoe2R
    @pcs @rejoe2 said in Can a Node subscribe to messages from another node?: Sending data directly to other nodes is also possible, please look for node to node communication, then you will find some few examples to follow. It's not subscribing but active sending from node to node: send(msgXXX.setDestination(target node)...)
  • How can I include MyMessage object in my own class?

    5
    0 Votes
    5 Posts
    2k Views
    G
    You are great guys! It compile already, later I will also check the functionality ;-)
  • Presentation (S_*) and set, req (V_*) limitations

    3
    0 Votes
    3 Posts
    924 Views
    Meshx86M
    yea i ended up using V_VAR1 - V_VAR5, V_CUSTOM, V_TEXT and presenting both S_INFO and S_CUSTOM. i am currently reading it through Wemos D1 Mini + MAX RS485 converter (working without logic converter just fine).
  • Using nrf24l01+ with other devices together on one SPI-Bus.

    12
    0 Votes
    12 Posts
    12k Views
    N
    I was trying to make NRF24 and ADXL345 work on the same SPI bus. Each device worked ok individually, but not together, when used by the same program. After some investigation, using a logic analyzer (listening to the SPI pins and to the CS pins of both devices), I managed to solve the problem. What I found was: NRF24 (TMRH20 library) sets SPI settings before each SPI transaction it makes. It uses SPI_MODE0, MSBFIRST, SPI speed up to 10 MHz (not 100% sure about the max speed). ADXL (SparkFun library) does not change existing SPI settings before its transactions. It seems to do it only once when creating an instance of the device ADXL345 adxl = ADXL345(ADXL_ChipSelect_PIN); Therefore, the first NRF24 transaction modifies SPI settings, disabling the ADXL345. ADXL345 uses SPI_MODE3. MSBFIRST. SPI speed up to 5 MHz, according to the specs. So, here is how I made them work together: In the code, before each ADXL transaction I insert: SPI.beginTransaction(SPISettings(4000000, MSBFIRST, SPI_MODE3)); and SPI.endTransaction(); at the end of each transaction. The detailed description can be found here. I didn’t have to use SPI settings before NRF24 SPI transactions because, as already mentioned above, the RF24 library does it. Here is an exemplary code, which seems to work fine. #include <SPI.h> #include <nRF24L01.h> #include <RF24.h> #include <SparkFun_ADXL345.h> ADXL345 adxl = ADXL345(10); RF24 radio(8, 9); const byte address[6] = "00001"; void setup() { SPI.begin(); radio.begin(); radio.openWritingPipe(address); radio.setPALevel(RF24_PA_MIN); radio.stopListening(); SPI.beginTransaction(SPISettings(4000000, MSBFIRST, SPI_MODE3)); //SPI seetings for ADXL adxl.powerOn(); adxl.setRangeSetting(2); adxl.setRate(3200); adxl.setSpiBit(0); SPI.endTransaction(); //SPI seetings for ADXL } void loop() { int x,y,z; SPI.beginTransaction(SPISettings(4000000, MSBFIRST, SPI_MODE3));//SPI seetings for ADXL adxl.readAccel(&x, &y, &z); SPI.endTransaction();//SPI seetings for ADXL int val = x; radio.write(&val, sizeof(val)); delay(500); } Here is the logic analyzer view of the working SPI communication of both devices. One can see SPI modes changing before each transaction. [image: 1511090136385-logic-resized.png] And I didn’t delete the 3 lines, mentioned by Oitzu in the beginning of this post. If I did, NRF24 would not be able to set SPI the way it needs (namely MODE0) before each transaction. I guess, the devices of Oitzu were using the same mode, therefore deleting the SPI settings didn’t harm in that particular case. Please correct me if I’m wrong. I hope it helps.
  • Diy Awake signal sensor

    9
    0 Votes
    9 Posts
    1k Views
    gohanG
    well yes, I know that, I am just saying he needs to be pointed in the right direction on how to retrieve values from controller :)

13

Online

11.7k

Users

11.2k

Topics

113.0k

Posts