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!
  • 0 Votes
    3 Posts
    4k Views
    ehomeE
    Thanks for your fast reply. That sounds easy. And you think that the communication between sensor nodes and Gateway are still possible via wired RS485? I tried to find an example on this site for sending Information from Gateway to sensor nodes. (via SendMessage ?) For example I like to Switch on/off an light that is connected to an relay board at my sensor node. Communcation Flow: OpenHab2 --> MQTT --> Gateway --> RS485 --> Sensor Node --> Relay Board Currently I have an working RS485 Connection between my Arduino Uno's with the use from SoftwareSerial library. During my testings I realized, that the message that I triy to send "Hello" will be sent to the other arduino char by char. Is that true? Because I tried to raise up an pin on HIGH with "if(msg == "Hello")..." But it doesn't worked. Will the sendMsg method from the MySensor library handle this out of the box? Regards, Simon
  • Simple Node without MySensors library

    2
    0 Votes
    2 Posts
    735 Views
    gohanG
    There is already an open thread about a soil moisture sensor with attiny which could only send data.
  • Ethernet gateway with ENC28J60 radio fail

    2
    0 Votes
    2 Posts
    1k Views
    peterjacksonP
    This is quite old - but I found this while having the same issues. Solved by moving the NRF24 pins around like this: // When ENC28J60 is connected we have to move CE/CSN pins for NRF radio #define MY_RF24_CE_PIN 5 #define MY_RF24_CS_PIN 6 // When ENC28J60 is connected, move SCK, MI and MO pins and enable SPI #define MY_SOFTSPI #define MY_SOFT_SPI_SCK_PIN 7 #define MY_SOFT_SPI_MISO_PIN 8 #define MY_SOFT_SPI_MOSI_PIN 9 And of course move the radio pins around.
  • Multiple DHT-22 sensor problem

    6
    0 Votes
    6 Posts
    3k Views
    Bogus ExceptionB
    @Slimz Speaking of reliability (life support), I was searching for similar posts to what I am experiencing (again) and came across this one. I don't see this in the DHT-11s I've tested (dozens), but this is frequent in the DHT-22s (no doubt just my luck)... they dies, and then rise from the dead... Check this out from last night: [image: DHT-22_BackToLife.png] All yesterday, no output from the DHT-22. I tried different pins, and almost tried another library (using SimpleDHT now). I had a 10k resistor between pins 1&2 (Vcc & Data), all to no avail. Also, I couldn't remember if having Vcc on the data pin was normal or not-but it was there... I went to bed, a beaten man. Then, the Sensor Fairy (C)2017 came to visit at around 4:00am, and now I have 2 problems: Why it didn't work, and... Why it works now. Just sharing because this kind of behavior has been common with me and the DHT-22s, and in your situation may not be noticeable. Hopefully you have alerts for env values out of range. If it really matters, I use a trusty BME280. good luck!
  • Better battery reporting

    4
    0 Votes
    4 Posts
    1k Views
    skywatchS
    I chose a different approach to this problem (but only with 1 power supply). That was to replace the resistor pair of 1M0 and 470K with 9M1 and 0.5M preset (trimmer). This reduces the current flow by about 90%+ and by adjusting the preset I can 'calibrate' it to 100%. Changing batteries doesn't seem to require retweeking if the same type are used. I even did a little sketch to load to the arduino to calibrate the battery reading before loading the main sketch. So far it is working well for me.
  • Remainder sleep time upon an interrupt

    6
    0 Votes
    6 Posts
    2k Views
    U
    @Carywin interesting thanks. If I have understood correctly it basically wraps around the sleep function like if I have to sleep 10 minutes I can e.g. sleep at chunks of 1 minute each so to have a better estimation of the remainder time. I'd try to implement this concept as well in NodeManager so to provide multiple alternatives (together with RTC, time from the controller, etc.) in global a "time-aware" enhancement. Thanks again!
  • how to query domoticz's security panel

    9
    0 Votes
    9 Posts
    5k Views
    S
    thank for the input
  • Controller Calibration of sensors

    13
    0 Votes
    13 Posts
    3k Views
    B
    Thanks @mfalkvidd - you're right, the interrupt would never be cleared until the code read the gesture. I uncommented the readGesture only to find that the code hanged at that point (think that was why I commented it out before - I'd had a beer or two). I think I really need to spend a bit of time learning about the Arduino programming language, and libraries etc as my programming knowledge is based on BASIC 30yrs ago and a bit of VBA at work. At the moment my arduino programming is just hacking stuff together and seeing if it works... Anyway I found that it was the library that IDE installed was wrong and I needed to get the library direct from Sparkfun... Now it works fine so I just need to MySensorise it...
  • This topic is deleted!

    3
    0 Votes
    3 Posts
    42 Views
  • Repeatrer level limit (NRF24L01 transport)

    25
    0 Votes
    25 Posts
    5k Views
    B
    @mfalkvidd said in Repeatrer level limit (NRF24L01 transport): Everything in MySensors started off in the development branch If you are using dev branch please test my sketch and check changing power mode with I_SIGNAL_REPORT_REQUEST message or transportGetSignalReport(const signalReport_t signalReport) function.
  • Which pin can be moved off the PWM

    3
    0 Votes
    3 Posts
    949 Views
    M
    Yes it was. Was powering the radio off an Arduino Nano's 3,3V and found that it didn't provide enough power to the radio. Switched to another nano and everything was fine. Thank you. P.S. A capacitor on the nrf power line didn't help
  • using pins A6 and A7 of arduino pro mini to read push button state

    7
    0 Votes
    7 Posts
    5k Views
    Nca78N
    @mfalkvidd said in using pins A6 and A7 of arduino pro mini to read push button state: You can perform a digitalRead on an analog pin if you want to though, see https://www.arduino.cc/en/Reference/DigitalRead Not on A6/A7, they are exclusively analog pins.
  • MH-Z19 not working with Arduino Uno R3 and ESP8266

    5
    0 Votes
    5 Posts
    4k Views
    B
    so maybe pins 13-19 are 3,3 volts on the z14 and pins 1-12 are 5volts?
  • Sleep time and external interrrupts

    9
    0 Votes
    9 Posts
    2k Views
    mfalkviddM
    @karlheinz2000 a global variable should work. Quick and dirty :grimacing: Make sure to name it something unique.
  • Bluetooth Proximity Sensor

    bluetooth presence
    33
    0 Votes
    33 Posts
    32k Views
    hekH
    Sorry, no. Realised modern phones BT goes into sleep mode which means they don't announce themselves for longer periods. Kind of made it meaningless for the application.
  • How to use SoftwareSerial Library?

    softwareserial rs485 arduino nano
    16
    0 Votes
    16 Posts
    6k Views
    kduinoK
    Hi PJR, now it is working with this code in the MyTransportRS485 without any changes on MySensors.h: #if defined(MY_RS485_SWSERIAL) SoftwareSerial& _dev = MY_RS485_SWSERIAL; #elif defined(__linux__) SerialPort _dev = SerialPort(MY_RS485_HWSERIAL); #elif defined(MY_RS485_HWSERIAL) HardwareSerial& _dev = MY_RS485_HWSERIAL; #else AltSoftSerial _dev; #endif As far as I can interpret the peace of code, the #include "hal/transport/MyTransportRS485.cpp" is active as soon as the MY_RS485 layer is defined. This is a great step, I can use all my nodes from now on! Thank you very much for your support! By Kduino
  • ce pin for nrf24l01 necessary ?

    1
    0 Votes
    1 Posts
    988 Views
    No one has replied
  • Imperihome and mysensors distance sensor

    2
    0 Votes
    2 Posts
    869 Views
    riochickenR
    @riochicken said in Imperihome and mysensors distance sensor: Hi all, For some reason I cannot see my distance sensor which I created with mysensors help and in combination with my Vera in Imperihome, it's in a seperate 'room' but not showing at all while the other two in the group are showing, anybody any idea how to solve it? Can it be that the sensor is not presented to the vera as a real device? I do see the device in my Vera and it nicely displays the distance... I would like to see this sensor in my imperihome for obvious reasons.. Thanks in advance! Kind regards Richard Nobody any idea? Is nobody using the distance sensor?
  • Real Time Clock

    1
    0 Votes
    1 Posts
    587 Views
    No one has replied
  • Smartsleep with 20ms polling Timer1 ISR

    1
    0 Votes
    1 Posts
    505 Views
    No one has replied

23

Online

11.7k

Users

11.2k

Topics

113.0k

Posts