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. My Project
  3. nRF5 action!

nRF5 action!

Scheduled Pinned Locked Moved My Project
1.9k Posts 49 Posters 637.3k Views 44 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.
  • NeverDieN NeverDie

    @Terrence said in Minimalist SAMD21 TQFP32 Pro Mini:

    @scalz said in Minimalist SAMD21 TQFP32 Pro Mini:

    And the cherry, with VS Micro, and multiple serial monitors in same ide

    Guys I have been developing with VS Code (free) for Arduino type coding. been very happy with it. It does not have multi serial monitors (not that I know of).
    Anyone else using VS Code?

    What are its advantages that are the reason for your preferring it?

    TerrenceT Offline
    TerrenceT Offline
    Terrence
    wrote on last edited by
    #100

    @NeverDie I prefer it over the Arduino platform, not VS Micro.

    It is a super lightweight editor, but really powerful with added extensions.
    In Windows Explorer, right click a folder and click on "Open with Code' and the folder and all code files are there.

    I have been using Visual Studio for work for a decade. It is a very heavy capable environment, but too heavy for simple ino projects.

    I used VS Micro 3 years ago or so, but I can't compare the two.

    https://code.visualstudio.com/

    Here is a snip showing the Arduino extension.
    0_1498766540886_upload-255eee95-5c42-464a-9769-e4795a8a3d73

    1 Reply Last reply
    0
    • NeverDieN Offline
      NeverDieN Offline
      NeverDie
      Hero Member
      wrote on last edited by
      #101

      I received the adafruit nrf52 feathers today, and I'm really quite shocked: adafruit doesn't supply any demo code (at least none that I can find) which would allow two nrf52 feathers to talk to one another. In fact, most of the demo code has nothing to do with bluetooth at all! This is very disappointing.

      YveauxY 1 Reply Last reply
      0
      • NeverDieN NeverDie

        I received the adafruit nrf52 feathers today, and I'm really quite shocked: adafruit doesn't supply any demo code (at least none that I can find) which would allow two nrf52 feathers to talk to one another. In fact, most of the demo code has nothing to do with bluetooth at all! This is very disappointing.

        YveauxY Offline
        YveauxY Offline
        Yveaux
        Mod
        wrote on last edited by
        #102

        @NeverDie I guess they just rely on mySensors for the communication :-)

        http://yveaux.blogspot.nl

        NeverDieN 1 Reply Last reply
        0
        • YveauxY Yveaux

          @NeverDie I guess they just rely on mySensors for the communication :-)

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

          @Yveaux said in Minimalist SAMD21 TQFP32 Pro Mini:

          @NeverDie I guess they just rely on mySensors for the communication :-)

          Wait, does mysensors demo code already work using the nrf52832?

          If not, does anyone know of some demo code somewhere that demos two 832's communicating (like there's plenty of demo code already for the NRF24L01)? I really don't want to figure this out from scratch using just the datasheet. Been there and done that already with the RFM69, and I don't want to have to do it again with the NRF52832. If there is not already a good "load and go" demo somewhere, then I'm going to return these modules to Amazon.

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

            @NeverDie
            Adafruit only provides examples for Bluetooth.

            regarding mysensors, i have answered here https://forum.mysensors.org/post/70297 ;)

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

              @NeverDie

              sidenote i forgot to say:

              your adafruit board should have a bootloader inside, so you can burn a sketch from arduino just by using ftdi (and allows some other features like ota etc). This is why i've also added dtr signal on my aeos in case.

              But I've not tried this configuration yet, and if i'm not wrong adafruit added freertos to their core files.
              So, i have no idea if burning a mysensors sketch by using adafruit boards in Arduino (so their core) will work out of the box.

              As, for the moment, i burn my mcus by using swd programmer (like for the atsam), and use the sandeep core files, in Arduino board manager, with custom board definition regarding my boards as i have not this adafruit board,I made mine before, else i would have ordered one :).

              I hope my explanations are clear, don't hesitate in case ;)

              NeverDieN 1 Reply Last reply
              0
              • scalzS scalz

                @NeverDie

                sidenote i forgot to say:

                your adafruit board should have a bootloader inside, so you can burn a sketch from arduino just by using ftdi (and allows some other features like ota etc). This is why i've also added dtr signal on my aeos in case.

                But I've not tried this configuration yet, and if i'm not wrong adafruit added freertos to their core files.
                So, i have no idea if burning a mysensors sketch by using adafruit boards in Arduino (so their core) will work out of the box.

                As, for the moment, i burn my mcus by using swd programmer (like for the atsam), and use the sandeep core files, in Arduino board manager, with custom board definition regarding my boards as i have not this adafruit board,I made mine before, else i would have ordered one :).

                I hope my explanations are clear, don't hesitate in case ;)

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

                @scalz
                I've been able to run Blink on the Adafruit NRF52 by compiling the Adafruit example Blink program within the Arduino IDE and then uploading it to the Adafruit NRF52 over the USB cable using the Arduino IDE, if that's what you mean. That part seems to work as intended, and it behaves just like any other Arduino in that respect. It's just that I had wrongly imagined that NRF52's would be communicating with each other using Bluetooth, and instead it sounds like (?) they'll actually be using a different, non-Bluetooth mode, for that--which is fine by me.

                If I understand you correctly, I should be able to just upload the mysensors demo code (one for a gateway and one for a node) to my two Adafruit NRF52's, and that's all it should take for them to then be communicating in a normal mysensors way. Is that right? If so, that would be very welcome news indeed.

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

                  @NeverDie
                  yes, you just need to do this

                  NeverDieN 1 Reply Last reply
                  0
                  • scalzS scalz

                    @NeverDie
                    yes, you just need to do this

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

                    @scalz
                    Are you sure? I just tried compiling the SerialGateway example inside the Arduino IDE with the board set to "Adafruit Bluefruit NRF52 Feather, " and it won't even compile. Looking at mysensors.h file, I think I can see why:

                    // Enable radio "feature" if one of the radio types was enabled
                    #if defined(MY_RADIO_NRF24) || defined(MY_RADIO_RFM69) || defined(MY_RADIO_RFM95) || defined(MY_RS485)
                    #define MY_SENSOR_NETWORK
                    #endif
                    
                    // HARDWARE
                    #if defined(ARDUINO_ARCH_ESP8266)
                    #include "core/MyHwESP8266.cpp"
                    #elif defined(ARDUINO_ARCH_AVR)
                    #include "drivers/AVR/DigitalWriteFast/digitalWriteFast.h"
                    #include "core/MyHwAVR.cpp"
                    #elif defined(ARDUINO_ARCH_SAMD)
                    #include "core/MyHwSAMD.cpp"
                    #elif defined(__linux__)
                    #include "core/MyHwLinuxGeneric.cpp"
                    #endif
                    

                    The library seems to have no recognition capability for either the NRF52 nor for any board based on it.

                    What do I need to modify to get it to work? Anyone know?

                    YveauxY 1 Reply Last reply
                    0
                    • NeverDieN NeverDie

                      @scalz
                      Are you sure? I just tried compiling the SerialGateway example inside the Arduino IDE with the board set to "Adafruit Bluefruit NRF52 Feather, " and it won't even compile. Looking at mysensors.h file, I think I can see why:

                      // Enable radio "feature" if one of the radio types was enabled
                      #if defined(MY_RADIO_NRF24) || defined(MY_RADIO_RFM69) || defined(MY_RADIO_RFM95) || defined(MY_RS485)
                      #define MY_SENSOR_NETWORK
                      #endif
                      
                      // HARDWARE
                      #if defined(ARDUINO_ARCH_ESP8266)
                      #include "core/MyHwESP8266.cpp"
                      #elif defined(ARDUINO_ARCH_AVR)
                      #include "drivers/AVR/DigitalWriteFast/digitalWriteFast.h"
                      #include "core/MyHwAVR.cpp"
                      #elif defined(ARDUINO_ARCH_SAMD)
                      #include "core/MyHwSAMD.cpp"
                      #elif defined(__linux__)
                      #include "core/MyHwLinuxGeneric.cpp"
                      #endif
                      

                      The library seems to have no recognition capability for either the NRF52 nor for any board based on it.

                      What do I need to modify to get it to work? Anyone know?

                      YveauxY Offline
                      YveauxY Offline
                      Yveaux
                      Mod
                      wrote on last edited by
                      #109

                      @NeverDie what MySensors library are you using? Nrf52 is only supported in development.

                      http://yveaux.blogspot.nl

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

                        @NeverDie

                        Yveaux is right, you need to use development branch of Mysensors, and just need to enable this define:
                        #define MY_RADIO_NRF5_ESB

                        You can also get more details here:
                        https://www.openhardware.io/view/376/MySensors-NRF5-Platform

                        1 Reply Last reply
                        0
                        • NeverDieN Offline
                          NeverDieN Offline
                          NeverDie
                          Hero Member
                          wrote on last edited by NeverDie
                          #111

                          I had been using the publicly released Mysensors library, but after your suggestions I switched over to the developers release.

                          So, now a new obstacle: if I compile using the board set as an Adafruit Bluefruit nRF52 Feather, I get the following fatal compile error:

                          Build options changed, rebuilding all
                          In file included from C:\Users\CoolerMaster\Documents\Arduino\mysensors sketches\GatewaySerial_v002\GatewaySerial_v002.ino:85:0:
                          
                          C:\Users\CoolerMaster\Documents\Arduino\libraries\MySensors/MySensors.h:352:2: error: #error No support for nRF5 radio on this platform
                          
                           #error No support for nRF5 radio on this platform
                          
                            ^
                          
                          exit status 1
                          Error compiling for board Adafruit Bluefruit nRF52 Feather.
                          

                          However, if I switch over to the "Generic nRF52" board from Nordic Semiconductor, it compiles just fine, but it hangs while uploading. :(

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

                            @NeverDie
                            yep that's what i was talking, regarding adafruit&core in board manager.
                            That would be easier to just use sandeep core only (as adafruit core is an extension using bootloader), and then use one of the boards available for nrf52.

                            You could try that :

                            • select NRF52 generic or DK in board manager (so this uses sandeep core)
                            • Select Softdevice : no
                            • Programmer : J-link
                            • Connect SWD programmer
                            • upload sketch

                            this should work, you'll just loose the adafruit bootloader feature i think.

                            1 Reply Last reply
                            0
                            • NeverDieN Offline
                              NeverDieN Offline
                              NeverDie
                              Hero Member
                              wrote on last edited by NeverDie
                              #113

                              I tried using the ST-LINK V2 programmer that I got from Amazon, but I think maybe (?) it's junk: almost nothing seems to recognize it after I've plugged it in. I've installed the USB driver for it from the ST website, and I've tried connecting to it using the ST-LINK utility program. It did recognize it long enough to identify its firmware and to actually (or so it said) upgrade its firmware to the current version. However, even that program can't seem to "connect" with it for anything else other than upgrading the firmware. Arduino doesn't see it at all.

                              So, maybe I need a better programmer? Is the DK for the 52832 from Nordic the one to get, or should I get something else (preferably something which might also work with the 52840 when that becomes available)?

                              An actual J-Link from Segger is priced at >$400. Are the cheap Aliexpress knock-offs just as good?
                              https://www.aliexpress.com/item/V9-the-LINK-J-LINK-ARM-emulator-support-A9A8-V9-4-high-speed-download-speed/32806221560.html?spm=2114.01010208.3.1.JlcJUT&ws_ab_test=searchweb0_0,searchweb201602_5_10152_10065_10151_10068_10130_10084_10083_10119_10080_10082_10081_10110_10178_10136_10137_519_10111_10060_10112_10113_10155_10114_437_10154_10056_10055_10054_10182_10059_303_100031_10099_10078_10079_10103_10073_10102_10120_10052_10053_10142_10107_142_10050_10051,searchweb201603_49,ppcSwitch_4&btsid=55ccaf9e-4381-4041-87de-32344016ca8e&algo_expid=281f8f71-cf63-4236-b1e7-4fbf7703f3dc-0&algo_pvid=281f8f71-cf63-4236-b1e7-4fbf7703f3dc

                              1 Reply Last reply
                              0
                              • NeverDieN Offline
                                NeverDieN Offline
                                NeverDie
                                Hero Member
                                wrote on last edited by NeverDie
                                #114

                                So, I went ahead and ordered this:
                                https://www.aliexpress.com/store/product/1PC-JLI-V9-J-LINK-ARM-emulator-support-A9A8-V9-3-high-speed-download/1710342_32790881245.html?spm=2114.12010615.0.0.5qtBo0

                                since it has e-packet delivery. Hopefully it's not a complete waste of money. Unfortunately, I guess there's not much more I can do until it arrives....

                                Anything else I should get to go with it? Like maybe:
                                https://www.amazon.com/ARM-JTAG-20-10-ARM-Micro-JTAG-adapter/dp/B009UEO9ZY/ref=pd_sim_21_1?_encoding=UTF8&pd_rd_i=B009UEO9ZY&pd_rd_r=C8G4T1QSJT3YVC6CQADF&pd_rd_w=CsX9i&pd_rd_wg=OIb04&psc=1&refRID=C8G4T1QSJT3YVC6CQADF
                                and/or
                                https://www.amazon.com/Gikfun-J-link-Emulator-Adapter-Converter/dp/B00RBHOSTY/ref=pd_sim_21_3?_encoding=UTF8&pd_rd_i=B00RBHOSTY&pd_rd_r=C8G4T1QSJT3YVC6CQADF&pd_rd_w=CsX9i&pd_rd_wg=OIb04&psc=1&refRID=C8G4T1QSJT3YVC6CQADF
                                and/or something else?

                                Is there by any chance some kind of bit-bang equivalent that someone has already developed? With arduino's being so cheap, I'd think there'd be a way to use one as a programmer, or at least as some kind of uploader, to an ARM mcu. I mean, how hard can it be?

                                1 Reply Last reply
                                0
                                • NeverDieN Offline
                                  NeverDieN Offline
                                  NeverDie
                                  Hero Member
                                  wrote on last edited by NeverDie
                                  #115

                                  Since it seems I'll be forced to use a programmer, the adafruit advantages completely go out the window. Therefore, I ordered a couple of these, which will probably (?) be just as good in the end, but a whole lot cheaper:
                                  https://www.aliexpress.com/item/nRF52832-Bluetooth-4-1-BLE-Module-M4-Transparent-Transmission-SMA-512K-FLASH-64K-RAM-pass-through/32798522093.html?spm=2114.01010208.3.17.YON8eD&ws_ab_test=searchweb0_0&aff_platform=aaf&cpt=1499046377472&sk=e2Vzr3v&aff_trace_key=0cb03246d5ed4112b865663460b55419-1499046377472-08913-e2Vzr3v

                                  I like that they have through-holes and not just castellated connectors. That will make them much easier to wire up.

                                  1 Reply Last reply
                                  0
                                  • NeverDieN Offline
                                    NeverDieN Offline
                                    NeverDie
                                    Hero Member
                                    wrote on last edited by NeverDie
                                    #116

                                    I also ordered this as my final insurance in case the J-Link Segger knock-off turns out not to work:
                                    https://www.aliexpress.com/item/2PCS-LOT-Link-OB-ARM-emulator-debugger-j-link-programmierer-downloader-link-statt-V8-SWD-Best/32813752595.html?spm=2114.13010608.0.0.RyKjDr

                                    If none of that extra hardware works, then I'll probably switch to Linux to see if I have more luck using that instead of Windows.

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

                                      @NeverDie
                                      I think this is because you need to install Zadig, open it, choose your swd programmer in list and change the driver. Then it should work.

                                      NeverDieN 1 Reply Last reply
                                      0
                                      • NeverDieN Offline
                                        NeverDieN Offline
                                        NeverDie
                                        Hero Member
                                        wrote on last edited by NeverDie
                                        #118

                                        Thanks! I'll give that a try.

                                        BTW, I noticed this nRF52830 module, which is interesting because it includes a trace antenna and is allegedly just 15.4mmx15.4mm in size: https://www.aliexpress.com/item/PTR5618-Nordic-nRF52832-Module-BLE-4-0-Module-Free-shipping/32758284869.html?spm=2114.10010108.100009.2.98oryP&traffic_analysisId=recommend_2037_null_null_null&scm=1007.13482.37805.0&pvid=c8de9a80-7258-4a83-a683-1ef7c7104607&tpp=1
                                        Granted, it doesn't expose as many pins though.

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

                                          @NeverDie
                                          oki cool.
                                          Raytac has also modules with pcb antenna, and interestingly, from their datasheet, perform worse than their chip antenna version.
                                          I prefer to clarify it a bit! We can't say pcb antenna are always better than chip antenna. :)
                                          But it's sure that you can't get the best performance with an antenna which is not adapted to the usecase.
                                          Also, when doing very tiny pcb, the gnd plane can be too small regarding the wavelength etc, decreasing even more the antenna efficiency.
                                          The more tiny, the less range..that's not a problem for a wearable, that you wear, close to your phone.

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


                                          29

                                          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