Group Details Private

Contest Winner

  • RE: Error compiling NodeManager DHT22 sensor

    Hi @Getz99, are you sure MODULE_DHT is enabled? Also ensure that you are using the right DHT package referenced in the documentation. Please note the package has changed from v1.6 to v1.7. Thanks!

    posted in NodeManager
  • RE: ds18b20 and negative temperature values

    Sorry for the delayed answer! Referencing https://github.com/mysensors/NodeManager/issues/219 to follow the resolution which as I mentioned might be a bit more complex unfortunately :)

    posted in NodeManager
  • RE: 💬 NodeManager

    @graham86 I guess you are referring to https://github.com/mysensors/NodeManager/pull/217, not 174, am I wrong? Anyway, any contribution that would help saving bytes is more than welcome: NodeManager is becoming more and more complex and the situations where we are out of storage start increasing so we definitely need to save whatever wherever we can :-) Regarding what you are proposing above, keep on eye on PR #217; once a new one dedicated to this part of the code will be created as discussed there, feel free to add your own PR to that branch or just let me know and I'll do it for you. Thanks!

    posted in OpenHardware.io
  • RE: nRF5 Bluetooth action!

    @Mike_Lemo said in nRF5 Bluetooth action!:

    Where is it possible to find a reference schematic for using the NTF52832 E73-2G4M04S module with NFC?
    not much is being given in the datasheet not even where the NFC pins go.

    Please look into the product documentation:
    http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/nfc.html?cp=2_1_0_41_8#concept_ryw_4hk_1s

    @NeverDie said in nRF5 Bluetooth action!:

    At the moment on Arduino, there is no definition of various OUTPUT modes. If you want to access all nRF5 output modes, you have to use hwPinMode and the OUTPUT_... macro.

    Exactly which macro would that be? It looks to me as though what most users will want is the function nrf5_pinmode(..,..), which appears to do all the actual work. Is that right? It is defined in the file nrf5_wiring_digital.c.

    hwPinMode allows to define platform specific PinMode replacements. Code may be portable. This is the reason pointing to nrf5_pinmode().

    nrf5_pinmode() has a little bit more functionality than the original pinmode function.

    Meanwhile, hwPinMode appears to be merely a straight pass-through for pinMode:

    void hwPinMode(uint8_t pin, uint8_t mode)
    {
    pinMode(pin, mode);
    }

    This disables the capability using nRF5 specific pin modes with the MySensors API.

    posted in My Project
  • RE: nRF5 Bluetooth action!

    @NeverDie said in nRF5 Bluetooth action!:

    @d00616
    Can you see any reason as to why the radio isn't waking the MCU after it receives a packet? Here's the entire sketch:

    I have no Idea why. The code is looking fine.

    posted in My Project
  • RE: [security] Introducing signing support to MySensors

    @ahmedadelhosni
    That is hard to say. There are many reports of atmega not being really good at handling 115200 at certain oscillator frequencies. So no, I don't think it directly hints at something being wrong with your hardware. But I cannot be sure of course :)

    posted in Development
  • RE: nRF5 Bluetooth action!

    @d00616 said in nRF5 Bluetooth action!:

    Maybe someone has an idea about the reason. Here is my code for nRF5 and other with nRF24.

    Now, I have the NRF5_ESB working under MY_CORE_ONLY condition. The HFCLK is not initialized. I do some code changes to allow using the radio in core only mode.

    posted in My Project
  • RE: [security] Introducing signing support to MySensors

    @ahmedadelhosni yes, this can happen on some targets. It depend on the quality and precision of the oscillator. If output looks garbled, reducing the baud rate is a good place to start.

    posted in Development
  • RE: nRF5 Bluetooth action!

    @NeverDie said in nRF5 Bluetooth action!:

    Whenever I use:
    #include <MySensors.h>

    on the nRF52832, there is around a 10 second delay between the end of "void startup()" and the beginning of "loop()". Why is that, and what is the MySensors library doing during that interval?

    As an alternative, you can define '#define MY_CORE_ONLY' and use ' transportInit(); transportSetAddress(MY_NODE_ID);' to initialize the radio. This dosn't work at the moment with the nRF5. I'm currently looking what the reason is. All radio registers are equal when it's initialized after MySensors normal and my setup(). It's not able to send or receive packages.

    Maybe someone has an idea about the reason. Here is my code for nRF5 and other with nRF24.

    // Undefine to work in gateway mode
    #define MY_CORE_ONLY
    
    
    #define MY_NODE_ID (0)
    
    // Enable debug
    #define MY_DEBUG
    #define MY_DEBUG_VERBOSE_RF24
    #define MY_DEBUG_VERBOSE_NRF5_ESB
    
    // Enable and select radio type attached
    #ifndef ARDUINO_ARCH_NRF5
    #define MY_RADIO_NRF24
    #else
    #define MY_RADIO_NRF5_ESB
    #include <nrf.h>
    #endif
    //#define MY_RADIO_RFM69
    //#define MY_RADIO_RFM95
    
    //#define MY_OTA_LOG_SENDER_FEATURE
    //#define MY_OTA_LOG_RECEIVER_FEATURE
    
    #ifndef MY_CORE_ONLY
    #define MY_GATEWAY_SERIAL
    #endif
    #include <MySensors.h>
    
    void state() {
    #ifdef ARDUINO_ARCH_NRF5
     Serial.println("----------------------------------");
     Serial.print("NRF_RADIO->STATE  ");
     Serial.println(NRF_RADIO->STATE, HEX);
     Serial.print("NRF_RADIO->EVENTS_READY  ");
     Serial.println(NRF_RADIO->EVENTS_READY, HEX);
     Serial.print("NRF_RADIO->EVENTS_ADDRESS  ");
     Serial.println(NRF_RADIO->EVENTS_ADDRESS, HEX);
     Serial.print("NRF_RADIO->EVENTS_PAYLOAD  ");
     Serial.println(NRF_RADIO->EVENTS_PAYLOAD, HEX);
     Serial.print("NRF_RADIO->EVENTS_END  ");
     Serial.println(NRF_RADIO->EVENTS_END, HEX);
     Serial.print("NRF_RADIO->EVENTS_DISABLED  ");
     Serial.println(NRF_RADIO->EVENTS_DISABLED, HEX);
     Serial.print("NRF_RADIO->EVENTS_DEVMATCH  ");
     Serial.println(NRF_RADIO->EVENTS_DEVMATCH, HEX);
     Serial.print("NRF_RADIO->EVENTS_DEVMISS  ");
     Serial.println(NRF_RADIO->EVENTS_DEVMISS, HEX);
     Serial.print("NRF_RADIO->EVENTS_RSSIEND  ");
     Serial.println(NRF_RADIO->EVENTS_RSSIEND, HEX);
     Serial.print("NRF_RADIO->EVENTS_BCMATCH  ");
     Serial.println(NRF_RADIO->EVENTS_BCMATCH, HEX);
     Serial.print("NRF_RADIO->CRCSTATUS  ");
     Serial.println(NRF_RADIO->CRCSTATUS, HEX);
     Serial.print("NRF_RADIO->RXMATCH  ");
     Serial.println(NRF_RADIO->RXMATCH, HEX);
     Serial.print("NRF_RADIO->RXCRC  ");
     Serial.println(NRF_RADIO->RXCRC, HEX);
     Serial.print("NRF_RADIO->DAI  ");
     Serial.println(NRF_RADIO->DAI, HEX);
     Serial.print("NRF_RADIO->PACKETPTR  ");
     Serial.println(NRF_RADIO->PACKETPTR, HEX);
     Serial.print("NRF_RADIO->FREQUENCY  ");
     Serial.println(NRF_RADIO->FREQUENCY, HEX);
     Serial.print("NRF_RADIO->TXPOWER  ");
     Serial.println(NRF_RADIO->TXPOWER, HEX);
     Serial.print("NRF_RADIO->MODE  ");
     Serial.println(NRF_RADIO->MODE, HEX);
     Serial.print("NRF_RADIO->PCNF0  ");
     Serial.println(NRF_RADIO->PCNF0, HEX);
     Serial.print("NRF_RADIO->PCNF1  ");
     Serial.println(NRF_RADIO->PCNF1, HEX);
     Serial.print("NRF_RADIO->BASE0  ");
     Serial.println(NRF_RADIO->BASE0, HEX);
     Serial.print("NRF_RADIO->BASE1  ");
     Serial.println(NRF_RADIO->BASE1, HEX);
     Serial.print("NRF_RADIO->PREFIX0  ");
     Serial.println(NRF_RADIO->PREFIX0, HEX);
     Serial.print("NRF_RADIO->PREFIX1  ");
     Serial.println(NRF_RADIO->PREFIX1, HEX);
     Serial.print("NRF_RADIO->TXADDRESS  ");
     Serial.println(NRF_RADIO->TXADDRESS, HEX);
     Serial.print("NRF_RADIO->RXADDRESSES  ");
     Serial.println(NRF_RADIO->RXADDRESSES, HEX);
     Serial.print("NRF_RADIO->CRCCNF  ");
     Serial.println(NRF_RADIO->CRCCNF, HEX);
     Serial.print("NRF_RADIO->SHORTS  ");
     Serial.println(NRF_RADIO->SHORTS, HEX);
     Serial.print("NRF5_RADIO_TIMER->MODE ");
     Serial.println(NRF5_RADIO_TIMER->MODE);
     Serial.print("NRF5_RADIO_TIMER->BITMODE ");
     Serial.println(NRF5_RADIO_TIMER->BITMODE);
     Serial.print("NRF5_RADIO_TIMER->SHORTS ");
     Serial.println(NRF5_RADIO_TIMER->SHORTS);
     Serial.print("NRF5_RADIO_TIMER->PRESCALER ");
     Serial.println(NRF5_RADIO_TIMER->PRESCALER);
      // Reset compare events
    #ifdef NRF51
      for (uint8_t i=0;i<4;i++) {
    #else
      for (uint8_t i=0;i<6;i++) {
    #endif
     Serial.print("NRF5_RADIO_TIMER->EVENTS_COMPARE[");
     Serial.print(i);
     Serial.print("] ");
     Serial.println(NRF5_RADIO_TIMER->EVENTS_COMPARE[i]);
    }
    Serial.println("----------------------------------");
    #endif
    }
    
    void setup() {
      Serial.begin(115200);
      
      #ifdef MY_CORE_ONLY
      transportInit();
      delay(1000);
      transportSetAddress(MY_NODE_ID);
      #endif
    }
    
    void loop() {
      state();
    
      #ifdef MY_CORE_ONLY
      // Check for packages
      if (transportAvailable()) {
        uint8_t buffer[256];
        uint8_t num = transportReceive(&buffer);
        for (int i=0;i<num;i++) {
          if (buffer[i]<0x10) Serial.print("0");
          Serial.print(buffer[i], HEX);
          Serial.print(" ");
        }
        Serial.println();
      }
      #endif
    
      // Pause
      //sleep(1000); don't use this on SAMD. The device must be restored with reset doubleclick
      delay(1000);
      
      // Send data
      //transportSend(MY_NODE_ID, "abcd", 4, false);
    }
    

    @NeverDie said in nRF5 Bluetooth action!:

    @d00616 said in nRF5 Bluetooth action!:

    P.S.: you can reduce the RX/TX time by enabling fast ramp up in MODECNF0 if you haven't to care about nRF51 compatibility.

    Thanks for the tip. I tried it both ways. The first scope capture below is taken without MODECNF0 enabled on bit 0, and the second is with it enabled on bit 0.

    Have you checked the MODECNF0 register after ramp up? Maybe the register must be changed in a specific state?

    posted in My Project
  • RE: nRF5 Bluetooth action!

    @NeverDie said in nRF5 Bluetooth action!:

    Question: Is
    NRF5_RESET_EVENT(NRF_RADIO->EVENTS_PAYLOAD);

    doing anything more than
    NRF_RADIO->EVENTS_PAYLOAD=0;

    is?

    Yes. It reads back the register. http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52/dita/nrf52/migration/functional.html?cp=2_4_0

    posted in My Project

Looks like your connection to MySensors Forum was lost, please wait while we try to reconnect.