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. OpenHardware.io
  3. 💬 MySensors NRF5 Platform

💬 MySensors NRF5 Platform

Scheduled Pinned Locked Moved OpenHardware.io
contest2017nrf52mysensorsnrf5nrf51
210 Posts 20 Posters 42.9k Views 18 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.
  • rmtuckerR rmtucker

    @NeverDie
    Just wondering about mysensors debug.
    If you have the jlink plugged in for programming but you also want to see the mysensors debug.
    Where is the ftdi adapter plugged in to for tx and rx ?
    And also i suspect that the vcc is not connected on the ftdi adapter because the jlink is supplying the board?
    Oh so many questions??

    NeverDieN Offline
    NeverDieN Offline
    NeverDie
    Hero Member
    wrote on last edited by NeverDie
    #44

    @rmtucker said in 💬 MySensors NRF5 Platform:

    Where is the ftdi adapter plugged in to for tx and rx ?

    That's determined by the "board" that you tell the compiler you are using. For example, on the nRF52 DK, the Rx pin is on P0.06. Presently, for simplicity, when I compile for the Ebyte module, I tell the Arduino IDE that it's an nRF52 DK, so then Rx is also on P0.06 and Tx is on P0.08.
    A more advanced way of doing it is to tell the Arduino IDE that the board is a "MyNrf5Board nRF52832", and then you can use d00616's method of pin mapping to make the Rx pin whichever of the mappable pins you want. That's a bit more involved though.

    And also i suspect that the vcc is not connected on the ftdi adapter because the jlink is supplying the board?

    Right. For old fashioned debugging using serial.println(), just Rx and GND is all I use.

    rmtuckerR 1 Reply Last reply
    0
    • NeverDieN NeverDie

      @rmtucker said in 💬 MySensors NRF5 Platform:

      Where is the ftdi adapter plugged in to for tx and rx ?

      That's determined by the "board" that you tell the compiler you are using. For example, on the nRF52 DK, the Rx pin is on P0.06. Presently, for simplicity, when I compile for the Ebyte module, I tell the Arduino IDE that it's an nRF52 DK, so then Rx is also on P0.06 and Tx is on P0.08.
      A more advanced way of doing it is to tell the Arduino IDE that the board is a "MyNrf5Board nRF52832", and then you can use d00616's method of pin mapping to make the Rx pin whichever of the mappable pins you want. That's a bit more involved though.

      And also i suspect that the vcc is not connected on the ftdi adapter because the jlink is supplying the board?

      Right. For old fashioned debugging using serial.println(), just Rx and GND is all I use.

      rmtuckerR Offline
      rmtuckerR Offline
      rmtucker
      wrote on last edited by rmtucker
      #45

      @NeverDie
      Disappointed so far with the NRF51822.:frowning:
      Basically it can not connect to any i2c sensors which mysensors relies on heavily.
      So not a lot can be done with it.
      It does integrate with mysensors well though,proved that with mockmysensors sketch.
      I dare not even try the spi interface.
      I would advise not trying this till the i2c problems are sorted out.
      At the moment it is running Blinky and thats it.

      AnticimexA 1 Reply Last reply
      1
      • rmtuckerR rmtucker

        @NeverDie
        Disappointed so far with the NRF51822.:frowning:
        Basically it can not connect to any i2c sensors which mysensors relies on heavily.
        So not a lot can be done with it.
        It does integrate with mysensors well though,proved that with mockmysensors sketch.
        I dare not even try the spi interface.
        I would advise not trying this till the i2c problems are sorted out.
        At the moment it is running Blinky and thats it.

        AnticimexA Offline
        AnticimexA Offline
        Anticimex
        Contest Winner
        wrote on last edited by
        #46

        @rmtucker can't you just bit bang the I2C sensors? Should not be any mcu incapable of that. There should be plenty drivers available that implement a bit banged I2C driver.

        Do you feel secure today? No? Start requiring some signatures and feel better tomorrow ;)

        rmtuckerR 1 Reply Last reply
        1
        • AnticimexA Anticimex

          @rmtucker can't you just bit bang the I2C sensors? Should not be any mcu incapable of that. There should be plenty drivers available that implement a bit banged I2C driver.

          rmtuckerR Offline
          rmtuckerR Offline
          rmtucker
          wrote on last edited by rmtucker
          #47

          @Anticimex
          I managed to get a nokia 5110 display connected and working using the u8glib and softspi.
          I can not get the easier to use adafruit library to compile though.
          Nor have i been able to find a Soft i2c library that will compile without errors.
          So i am afraid i2c is still a non starter.

          1 Reply Last reply
          0
          • scalzS Offline
            scalzS Offline
            scalz
            Hardware Contributor
            wrote on last edited by scalz
            #48

            @rmtucker said in 💬 MySensors NRF5 Platform:

            So i am afraid i2c is still a non starter.

            maybe try this one https://github.com/felias-fogg/SlowSoftWire
            I don't use it, but it compiles fine for nrf52. I already tested it a while ago, and it worked for me.

            rmtuckerR 1 Reply Last reply
            1
            • scalzS scalz

              @rmtucker said in 💬 MySensors NRF5 Platform:

              So i am afraid i2c is still a non starter.

              maybe try this one https://github.com/felias-fogg/SlowSoftWire
              I don't use it, but it compiles fine for nrf52. I already tested it a while ago, and it worked for me.

              rmtuckerR Offline
              rmtuckerR Offline
              rmtucker
              wrote on last edited by
              #49

              @scalz
              my head is battered with this.
              tried the library you mentioned and it compiled fine but still gave spurious readings.
              so i plugged the htu21d back in to a nano and used the sparkfun library demo.
              the readings were perfect.
              so frustrated with this because all my nodes use i2c sensors.

              NeverDieN 1 Reply Last reply
              0
              • rmtuckerR rmtucker

                @scalz
                my head is battered with this.
                tried the library you mentioned and it compiled fine but still gave spurious readings.
                so i plugged the htu21d back in to a nano and used the sparkfun library demo.
                the readings were perfect.
                so frustrated with this because all my nodes use i2c sensors.

                NeverDieN Offline
                NeverDieN Offline
                NeverDie
                Hero Member
                wrote on last edited by NeverDie
                #50

                @rmtucker
                Stupid question, but are your i2c sensors getting all the voltage that they need? After all, a nano runs at 5v, right? I know that some of the TH i2c sensors include voltage regulators, which would drop the voltage even further. If necessary, those could be removed. That's what I generally do.

                rmtuckerR 1 Reply Last reply
                0
                • NeverDieN NeverDie

                  @rmtucker
                  Stupid question, but are your i2c sensors getting all the voltage that they need? After all, a nano runs at 5v, right? I know that some of the TH i2c sensors include voltage regulators, which would drop the voltage even further. If necessary, those could be removed. That's what I generally do.

                  rmtuckerR Offline
                  rmtuckerR Offline
                  rmtucker
                  wrote on last edited by
                  #51

                  @NeverDie
                  Yes They are 3.3v sensors.
                  What we need is someone else using nrf51822 and i2c sensors that can shine some light.

                  Nca78N 1 Reply Last reply
                  0
                  • rmtuckerR rmtucker

                    @NeverDie
                    Yes They are 3.3v sensors.
                    What we need is someone else using nrf51822 and i2c sensors that can shine some light.

                    Nca78N Offline
                    Nca78N Offline
                    Nca78
                    Hardware Contributor
                    wrote on last edited by
                    #52

                    @rmtucker said in 💬 MySensors NRF5 Platform:

                    @NeverDie
                    Yes They are 3.3v sensors.
                    What we need is someone else using nrf51822 and i2c sensors that can shine some light.

                    I'll try soon, hopefully I'll have time tomorrow, my nrf51 module is soldered on a breadboard. I need to make the promised tests on the nrf52 too ...

                    rmtuckerR 1 Reply Last reply
                    0
                    • Nca78N Nca78

                      @rmtucker said in 💬 MySensors NRF5 Platform:

                      @NeverDie
                      Yes They are 3.3v sensors.
                      What we need is someone else using nrf51822 and i2c sensors that can shine some light.

                      I'll try soon, hopefully I'll have time tomorrow, my nrf51 module is soldered on a breadboard. I need to make the promised tests on the nrf52 too ...

                      rmtuckerR Offline
                      rmtuckerR Offline
                      rmtucker
                      wrote on last edited by
                      #53

                      @Nca78
                      Just an observation after many hours of tinkering.
                      There is no problem reading one byte back from i2c,like when doing an i2c scan.
                      It comes back with the address of the htu21d no problem.
                      But if you try to read 3 bytes which is what you do when reading the temp etc,it goes T*TS up.

                      rmtuckerR 1 Reply Last reply
                      1
                      • rmtuckerR rmtucker

                        @Nca78
                        Just an observation after many hours of tinkering.
                        There is no problem reading one byte back from i2c,like when doing an i2c scan.
                        It comes back with the address of the htu21d no problem.
                        But if you try to read 3 bytes which is what you do when reading the temp etc,it goes T*TS up.

                        rmtuckerR Offline
                        rmtuckerR Offline
                        rmtucker
                        wrote on last edited by
                        #54

                        Well guys after all that :frowning:
                        I had not installed the development version from git.:angry:
                        After installling the development version the i2c is working fine.
                        Suprised no one else has done this??

                        From git (for core development)
                        
                        Follow steps from Board Manager section above
                        cd <SKETCHBOOK>, where <SKETCHBOOK> is your Arduino Sketch folder:
                        OS X: ~/Documents/Arduino
                        Linux: ~/Arduino
                        Windows: ~/Documents/Arduino
                        Create a folder named hardware, if it does not exist, and change directories to it
                        Clone this repo: git clone https://github.com/sandeepmistry/arduino-nRF5.git sandeepmistry/nRF5
                        Restart the Arduino IDE```
                        rmtuckerR 1 Reply Last reply
                        2
                        • rmtuckerR rmtucker

                          Well guys after all that :frowning:
                          I had not installed the development version from git.:angry:
                          After installling the development version the i2c is working fine.
                          Suprised no one else has done this??

                          From git (for core development)
                          
                          Follow steps from Board Manager section above
                          cd <SKETCHBOOK>, where <SKETCHBOOK> is your Arduino Sketch folder:
                          OS X: ~/Documents/Arduino
                          Linux: ~/Arduino
                          Windows: ~/Documents/Arduino
                          Create a folder named hardware, if it does not exist, and change directories to it
                          Clone this repo: git clone https://github.com/sandeepmistry/arduino-nRF5.git sandeepmistry/nRF5
                          Restart the Arduino IDE```
                          rmtuckerR Offline
                          rmtuckerR Offline
                          rmtucker
                          wrote on last edited by
                          #55

                          @rmtucker

                          Please can someone update the instructions below to mention installing the development version

                          Preparing Arduino
                          Arduino doesn't support the nRF5 platform in a standard setup. You have to add the arduino-nRF5 platform via Arduino's Board Manager like described in https://github.com/sandeepmistry/arduino-nRF5/#installing
                          
                          
                          Nca78N 1 Reply Last reply
                          0
                          • rmtuckerR rmtucker

                            @rmtucker

                            Please can someone update the instructions below to mention installing the development version

                            Preparing Arduino
                            Arduino doesn't support the nRF5 platform in a standard setup. You have to add the arduino-nRF5 platform via Arduino's Board Manager like described in https://github.com/sandeepmistry/arduino-nRF5/#installing
                            
                            
                            Nca78N Offline
                            Nca78N Offline
                            Nca78
                            Hardware Contributor
                            wrote on last edited by
                            #56

                            @rmtucker said in 💬 MySensors NRF5 Platform:

                            Please can someone update the instructions below to mention installing the development version

                            Preparing Arduino
                            Arduino doesn't support the nRF5 platform in a standard setup. You have to add the arduino-nRF5 platform via Arduino's Board Manager like described in https://github.com/sandeepmistry/arduino-nRF5/#installing
                            
                            

                            @d00616 maybe ? :)

                            NeverDieN 1 Reply Last reply
                            0
                            • Nca78N Nca78

                              @rmtucker said in 💬 MySensors NRF5 Platform:

                              Please can someone update the instructions below to mention installing the development version

                              Preparing Arduino
                              Arduino doesn't support the nRF5 platform in a standard setup. You have to add the arduino-nRF5 platform via Arduino's Board Manager like described in https://github.com/sandeepmistry/arduino-nRF5/#installing
                              
                              

                              @d00616 maybe ? :)

                              NeverDieN Offline
                              NeverDieN Offline
                              NeverDie
                              Hero Member
                              wrote on last edited by NeverDie
                              #57

                              If there are multiple libraries with the same name (as there seem to be), then how does the compiler know which one to pick? Is it just the first one whose name matches in whatever pathway it follows? Since it obviously compiled even though rmtucker was missing the proper libraries... this just sounds like a heartache waiting to happen unless everything is setup just-so. rmtucker's case seems to prove there won't be any warnings if it picks the wrong one.

                              1 Reply Last reply
                              0
                              • scalzS Offline
                                scalzS Offline
                                scalz
                                Hardware Contributor
                                wrote on last edited by
                                #58

                                looking at d00616 howto it's explained to use Mysensors development branch (or maybe he added it today :) ). but that makes sense as this port is newer than master branch.

                                @NeverDie
                                it uses the core libraries depending on the board used in Arduino.

                                mfalkviddM 1 Reply Last reply
                                0
                                • scalzS scalz

                                  looking at d00616 howto it's explained to use Mysensors development branch (or maybe he added it today :) ). but that makes sense as this port is newer than master branch.

                                  @NeverDie
                                  it uses the core libraries depending on the board used in Arduino.

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

                                  @scalz: I think @rmtucker was discussing using the development version of the sandeepmistry nrf5 Arduino library, it was not related to the MySensors library.

                                  rmtuckerR 1 Reply Last reply
                                  1
                                  • mfalkviddM mfalkvidd

                                    @scalz: I think @rmtucker was discussing using the development version of the sandeepmistry nrf5 Arduino library, it was not related to the MySensors library.

                                    rmtuckerR Offline
                                    rmtuckerR Offline
                                    rmtucker
                                    wrote on last edited by
                                    #60

                                    @mfalkvidd
                                    Sorry i should have made it more understandable.
                                    When you follow the instructions below as per sandeeps site it does not install the latest NR5 libraries that you see on github.

                                    Installing
                                    
                                    Board Manager
                                    
                                    Download and install the Arduino IDE (At least v1.6.12)
                                    Start the Arduino IDE
                                    Go into Preferences
                                    Add https://sandeepmistry.github.io/arduino-nRF5/package_nRF5_boards_index.json as an "Additional Board Manager URL"
                                    Open the Boards Manager from the Tools -> Board menu and install "Nordic Semiconductor nRF5 Boards"
                                    Select your nRF5 board from the Tools -> Board menu
                                    

                                    Following this you must install the development version aswell which is what you see on github by doing this.

                                    From git (for core development)
                                    
                                    Follow steps from Board Manager section above
                                    cd <SKETCHBOOK>, where <SKETCHBOOK> is your Arduino Sketch folder:
                                    OS X: ~/Documents/Arduino
                                    Linux: ~/Arduino
                                    Windows: ~/Documents/Arduino
                                    Create a folder named hardware, if it does not exist, and change directories to it
                                    Clone this repo: git clone https://github.com/sandeepmistry/arduino-nRF5.git sandeepmistry/nRF5
                                    Restart the Arduino IDE
                                    

                                    Otherwise you run into all kinds of problems using the old library.

                                    1 Reply Last reply
                                    1
                                    • d00616D Offline
                                      d00616D Offline
                                      d00616
                                      Contest Winner
                                      wrote on last edited by
                                      #61

                                      I have added a note at the end of the installation documentation. To make things easier, I have opened an issue to update the Arduino-nRF5 release.

                                      https://github.com/sandeepmistry/arduino-nRF5/issues/182

                                      d00616D 1 Reply Last reply
                                      1
                                      • d00616D d00616

                                        I have added a note at the end of the installation documentation. To make things easier, I have opened an issue to update the Arduino-nRF5 release.

                                        https://github.com/sandeepmistry/arduino-nRF5/issues/182

                                        d00616D Offline
                                        d00616D Offline
                                        d00616
                                        Contest Winner
                                        wrote on last edited by
                                        #62

                                        I2C should be fixed now. Version 0.4.0 is released!

                                        rmtuckerR NeverDieN 2 Replies Last reply
                                        1
                                        • d00616D d00616

                                          I2C should be fixed now. Version 0.4.0 is released!

                                          rmtuckerR Offline
                                          rmtuckerR Offline
                                          rmtucker
                                          wrote on last edited by
                                          #63

                                          @d00616
                                          So should i be able to delete the hardware folder that the development version created from github and just update from boards manager?.

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


                                          10

                                          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