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. Troubleshooting
  3. Sensor node not working without #define MyDebug

Sensor node not working without #define MyDebug

Scheduled Pinned Locked Moved Troubleshooting
25 Posts 6 Posters 6.3k Views 5 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.
  • delinendD delinend

    @tekka
    Btw. Another problem. If I use the "#define MY_DISABLED_SERIAL" on my GatewaySerial.ino I still get incomming message on the serial port. Ex. temp sendet from a tempsensor here:
    6;0;1;0;0,24.5
    6;0;1;0;0,24.6
    6;0;1;0;0,24.5
    6;0;1;0;0,24.4
    6;0;1;0;0,24.5

    tekkaT Offline
    tekkaT Offline
    tekka
    Admin
    wrote on last edited by
    #15

    @delinend said:

    @tekka
    Btw. Another problem. If I use the "#define MY_DISABLED_SERIAL" on my GatewaySerial.ino I still get incomming message on the serial port. Ex. temp sendet from a tempsensor here:
    6;0;1;0;0,24.5
    6;0;1;0;0,24.6
    6;0;1;0;0,24.5
    6;0;1;0;0,24.4
    6;0;1;0;0,24.5

    Well, there is no sense in disabling the serial port on a serial gateway :smirk:

    1 Reply Last reply
    1
    • tekkaT tekka

      @delinend
      I also need the AVR board def version - you can find this information in the Boards Manager.

      delinendD Offline
      delinendD Offline
      delinend
      wrote on last edited by
      #16

      @tekka
      BN: Unknown board
      VID: 10C4
      PID EA60
      SN: Upload any sketch to obtain it

      Btw. I use OpTiboot loader

      tekkaT 1 Reply Last reply
      0
      • delinendD delinend

        I have solved it, with the fix from Alex, with a delay(10) in the loop() :-) Thanks

        ayoA Offline
        ayoA Offline
        ayo
        wrote on last edited by ayo
        #17

        So I tried to see if I make one last attempt to fix this problem again, I tried the Alex option using a delay(10) in the for loop. So I put a delay(10) in the for loop of my gateway code whoa it works fully well. I guess their is truly a timely issues here and the enable my_debug it's somehow doing a slowing things down work.
        But using a delay(10) in the loop isn't really an efficient way though.
        @delinend said:

        I have solved it, with the fix from Alex, with a delay(10) in the loop() :-) Thanks

        UPDATE: Using a delay(1) also works for me too

        1 Reply Last reply
        0
        • delinendD delinend

          @tekka
          BN: Unknown board
          VID: 10C4
          PID EA60
          SN: Upload any sketch to obtain it

          Btw. I use OpTiboot loader

          tekkaT Offline
          tekkaT Offline
          tekka
          Admin
          wrote on last edited by tekka
          #18

          @delinend Still not the right thing. Sorry for bugging you with that ;)

          You'll find the requested information under:

          In Arduino IDE under Tools | Board | Boards Manager => Arduino AVR Boards Built-in by Arduino version 1.6.xx

          delinendD 1 Reply Last reply
          0
          • tekkaT tekka

            @delinend Still not the right thing. Sorry for bugging you with that ;)

            You'll find the requested information under:

            In Arduino IDE under Tools | Board | Boards Manager => Arduino AVR Boards Built-in by Arduino version 1.6.xx

            delinendD Offline
            delinendD Offline
            delinend
            wrote on last edited by
            #19

            @tekka
            It's: Arduino AVR Board Built-In by Arduino version 1.6.14 installed.

            tekkaT 1 Reply Last reply
            0
            • delinendD delinend

              @tekka
              It's: Arduino AVR Board Built-In by Arduino version 1.6.14 installed.

              tekkaT Offline
              tekkaT Offline
              tekka
              Admin
              wrote on last edited by
              #20

              @delinend I've tried your setup but cannot reproduce your issue. Are you on the latest dev branch (from today)? What board did you choose in the settings?

              Out of curiosity, please upload this sketch:

              #define MY_CORE_ONLY
              #define MY_DEBUG
              #include <MySensors.h>
              
              void setup() {
                Serial.begin(115200);
                Serial.println("***");
                Serial.print("V=");
                Serial.println(hwCPUVoltage());
                Serial.print("F=");
                Serial.println(hwCPUFrequency());  
                Serial.println("***");
              }
              
              void loop() {}
              

              and post the serial output.

              1 Reply Last reply
              0
              • delinendD Offline
                delinendD Offline
                delinend
                wrote on last edited by delinend
                #21

                Here the output.


                V=3726
                F=89


                The board name is: [Optiboot] Arduino Pro or Pro Mini (3.3V, 8 MHz) w/ ATmega328
                As I use Optiboot bootloader.

                ##############################################################

                pro328o.name=[Optiboot] Arduino Pro or Pro Mini (3.3V, 8 MHz) w/ ATmega328
                pro328o.upload.tool=avrdude
                pro328o.upload.protocol=arduino
                pro328o.upload.maximum_size=32256
                pro328o.upload.maximum_data_size=2048
                pro328o.upload.speed=57600
                pro328o.bootloader.tool=avrdude
                pro328o.bootloader.low_fuses=0xff
                pro328o.bootloader.high_fuses=0xde
                pro328o.bootloader.extended_fuses=0xfd
                pro328o.bootloader.file=optiboot/optiboot_atmega328.hex
                pro328o.bootloader.unlock_bits=0x3F
                pro328o.bootloader.lock_bits=0x0F
                pro328o.build.mcu=atmega328p
                pro328o.build.board=AVR_PRO
                pro328o.build.f_cpu=8000000L
                pro328o.build.core=arduino
                pro328o.build.variant=eightanaloginputs

                ##############################################################

                tekkaT 1 Reply Last reply
                0
                • delinendD delinend

                  Here the output.


                  V=3726
                  F=89


                  The board name is: [Optiboot] Arduino Pro or Pro Mini (3.3V, 8 MHz) w/ ATmega328
                  As I use Optiboot bootloader.

                  ##############################################################

                  pro328o.name=[Optiboot] Arduino Pro or Pro Mini (3.3V, 8 MHz) w/ ATmega328
                  pro328o.upload.tool=avrdude
                  pro328o.upload.protocol=arduino
                  pro328o.upload.maximum_size=32256
                  pro328o.upload.maximum_data_size=2048
                  pro328o.upload.speed=57600
                  pro328o.bootloader.tool=avrdude
                  pro328o.bootloader.low_fuses=0xff
                  pro328o.bootloader.high_fuses=0xde
                  pro328o.bootloader.extended_fuses=0xfd
                  pro328o.bootloader.file=optiboot/optiboot_atmega328.hex
                  pro328o.bootloader.unlock_bits=0x3F
                  pro328o.bootloader.lock_bits=0x0F
                  pro328o.build.mcu=atmega328p
                  pro328o.build.board=AVR_PRO
                  pro328o.build.f_cpu=8000000L
                  pro328o.build.core=arduino
                  pro328o.build.variant=eightanaloginputs

                  ##############################################################

                  tekkaT Offline
                  tekkaT Offline
                  tekka
                  Admin
                  wrote on last edited by
                  #22

                  @delinend Ok, so you have a slightly higher voltage and frequency - this could cause some timing issues, since the sketch is compiled at 8Mhz. Can you feed 3.3V, e.g. using a voltage regulator?

                  delinendD 1 Reply Last reply
                  0
                  • tekkaT tekka

                    @delinend Ok, so you have a slightly higher voltage and frequency - this could cause some timing issues, since the sketch is compiled at 8Mhz. Can you feed 3.3V, e.g. using a voltage regulator?

                    delinendD Offline
                    delinendD Offline
                    delinend
                    wrote on last edited by
                    #23

                    @tekka
                    This is with my Lab Powersupply to 3.3V


                    V=3300
                    F=89


                    tekkaT 1 Reply Last reply
                    0
                    • delinendD delinend

                      @tekka
                      This is with my Lab Powersupply to 3.3V


                      V=3300
                      F=89


                      tekkaT Offline
                      tekkaT Offline
                      tekka
                      Admin
                      wrote on last edited by
                      #24

                      @delinend ok, and still the same with MY_DEBUG and the latest dev branch?

                      delinendD 1 Reply Last reply
                      0
                      • tekkaT tekka

                        @delinend ok, and still the same with MY_DEBUG and the latest dev branch?

                        delinendD Offline
                        delinendD Offline
                        delinend
                        wrote on last edited by delinend
                        #25

                        @tekka
                        Hmm.. It works fine without the delay(10), at 3.3V! But if I rice the voltage to around 3.6-3.7V, I have to add the delay(10) again in the void loop(). ?!?!

                        Btw. The nRF24l01+ is attached Vcc on the Arduino Mini Pro board.

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


                        16

                        Online

                        11.7k

                        Users

                        11.2k

                        Topics

                        113.0k

                        Posts


                        Copyright 2019 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