Skip to content
  • 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. Announcements
  3. 💬 Battery Powered Sensors
  • Getting Started
  • Controller
  • Build
  • Hardware
  • Download/API
  • Forum
  • Store

💬 Battery Powered Sensors

Scheduled Pinned Locked Moved Announcements
battery
347 Posts 55 Posters 67.0k Views 53 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.
  • G Gilles BILLARD

    @Yveaux
    YESSSSSS !<
    That was the last problèm to solve.
    Back with my own MySensors routine all is perfect ! (8uA in sleep mode)
    I am very happy now and I thank all those who assisted me.
    You've made my day !
    Gilles

    skywatchS Offline
    skywatchS Offline
    skywatch
    wrote on last edited by
    #318

    @Gilles-BILLARD @Yveaux beat me to it! - But I bet you are a very happy person after that - it is easy when you know how! :)

    1 Reply Last reply
    1
    • G Gilles BILLARD

      @skywatch NO WAY ! So bad !
      I burned the MiniCore bootloader quite eazily using a second Pro-Mini loaded with Arduino BootLoader ( juste a file name error; looking for optiboot_flash_atmega328p_UART1_115200_16000000L_B5.hex but only optiboot_flash_atmega328p_UART0_115200_16000000L_B5.hex on the folder, so I just changed 0-->1 in the file name) and the résult was:
      *
      avrdude: Version 6.3-20201216
      Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
      Copyright (c) 2007-2014 Joerg Wunsch

           System wide configuration file is "C:\Users\billa\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.1.0/avrdude.conf"
      
           Using Port                    : COM7
           Using Programmer              : stk500v1
           Overriding Baud Rate          : 19200
           AVR Part                      : ATmega328P
           Chip Erase delay              : 9000 us
           PAGEL                         : PD7
           BS2                           : PC2
           RESET disposition             : dedicated
           RETRY pulse                   : SCK
           serial program mode           : yes
           parallel program mode         : yes
           Timeout                       : 200
           StabDelay                     : 100
           CmdexeDelay                   : 25
           SyncLoops                     : 32
           ByteDelay                     : 0
           PollIndex                     : 3
           PollValue                     : 0x53
           Memory Detail                 :
      
                                    Block Poll               Page                       Polled
             Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
             ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
             eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
             flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
             lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
             hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
             efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
             lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
             calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
             signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
      
           Programmer Type : STK500
           Description     : Atmel STK500 Version 1.x firmware
           Hardware Version: 2
           Firmware Version: 1.18
           Topcard         : Unknown
           Vtarget         : 0.0 V
           Varef           : 0.0 V
           Oscillator      : Off
           SCK period      : 0.1 us
      

      avrdude: AVR device initialized and ready to accept instructions

      Reading | ################################################## | 100% 0.04s

      avrdude: Device signature = 0x1e950f (probably m328p)
      avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
      To disable this feature, specify the -D option.
      avrdude: erasing chip
      avrdude: reading input file "C:\Users\billa\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.1.0/bootloaders/empty/empty.hex"
      avrdude: writing flash (0 bytes):

      Writing | ################################################## | 100% 0.00s

      avrdude: 0 bytes of flash written
      avrdude: verifying flash memory against C:\Users\billa\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.1.0/bootloaders/empty/empty.hex:
      avrdude: load data flash data from input file C:\Users\billa\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.1.0/bootloaders/empty/empty.hex:
      avrdude: input file C:\Users\billa\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.1.0/bootloaders/empty/empty.hex contains 0 bytes
      avrdude: reading on-chip flash data:

      Reading | ################################################## | 100% -0.00s

      avrdude: verifying ...
      avrdude: 0 bytes of flash verified
      avrdude: reading input file "0x0f"
      avrdude: writing lock (1 bytes):

      Writing | ################################################## | 100% 0.04s

      avrdude: 1 bytes of lock written
      avrdude: verifying lock memory against 0x0f:
      avrdude: load data lock data from input file 0x0f:
      avrdude: input file 0x0f contains 1 bytes
      avrdude: reading on-chip lock data:

      Reading | ################################################## | 100% 0.01s

      avrdude: verifying ...
      avrdude: 1 bytes of lock verified

      avrdude done. Thank you.


      Then I loaded it with Blink demo...
      At this point all's OKay. Both Po-Mini are blinking
      Blink
      Then I've loaded the 2nd with that:

      // Enable and select radio type attached
      #define MY_RADIO_RF24
      #include <MySensors.h>
      uint32_t SLEEP_TIME = 4000;  // sleep time (in seconds * 1000 )
      
      void setup() 
      {
      pinMode(LED_BUILTIN, OUTPUT);
      }
      
      void presentation()
      {  
        sendSketchInfo("Test Prgm", "1.0"); // Send the sketch version information to the gateway and Controller
      }
      void loop()
      {
        digitalWrite(LED_BUILTIN, HIGH);
      delay(1000);
        digitalWrite(LED_BUILTIN, LOW);
      delay(1000);  
        
      sleep(SLEEP_TIME);
      }
      

      and...
      the result is...
      No blinking
      NO BLINK
      (draining more or less 2mA; Varying quickly from 1600uA to 2000uA; I should put a scope probe on that....)

      T Offline
      T Offline
      tssk
      wrote on last edited by
      #319

      @Gilles-BILLARD Damn! Why did I order UNO if I could use another Pro Mini for programming... :)

      G 1 Reply Last reply
      0
      • T tssk

        @Gilles-BILLARD Damn! Why did I order UNO if I could use another Pro Mini for programming... :)

        G Offline
        G Offline
        Gilles BILLARD
        wrote on last edited by
        #320

        @tssk My Pro-Mini's are 3.3V, so this way I avoid the resistors dividers wiring to change 5V (Uno) to 3.3 (Pro-Mini);
        May be you love creating problems where there are none ;-)

        1 Reply Last reply
        0
        • G Offline
          G Offline
          Gilles BILLARD
          wrote on last edited by Gilles BILLARD
          #321

          Hy guys; So sorry but the procedure ran just once :-/
          When I reproammed my soldred Pro-Minis (via the radio socket + 1 air wire to the reset pin) none was running as expected; The issue was a kind of permanent reboot..????
          I tried to burn the MinCore bootloader and load my sketch into several brand new boards and the result was the same...
          So I simplified and simplified again the sketches until this one:

          
          /*This sketch is cycling wether you comment MY-DEBUG.....
          SERIAL MONITOR report: 
                    2021-04-04 17:20:04.426 Status: MySensors: Node: 20, Sketch Name: Temperature Sensor Test
                    2021-04-04 17:20:04.426 Status: MySensors: Node: 20, Sketch Version: G.B.
                    2021-04-04 17:20:15.378 (GiBi-Home) Temp (Temptest)
                    2021-04-04 17:20:15.368 Status: MySensors: Node: 20, Sketch Name: Temperature Sensor Test
                    2021-04-04 17:20:15.368 Status: MySensors: Node: 20, Sketch Version: G.B.
                    .
                    .
                    .
                    
          ......or running as it should do if you uncomment MY-DEBUG
          SERIAL MONITOR report: 
                    2021-04-04 17:22:52.558 Status: MySensors: Node: 20, Sketch Name: Temperature Sensor Test
                    2021-04-04 17:22:52.558 Status: MySensors: Node: 20, Sketch Version: G.B.
                    2021-04-04 17:23:02.654 (GiBi-Home) Temp (Temptest)
                    2021-04-04 17:23:12.717 (GiBi-Home) Temp (Temptest)
                    2021-04-04 17:23:22.781 (GiBi-Home) Temp (Temptest)
                    .
                    .
                    .
          NOTA: wether bootLoader is ordinary AVR bootloader or MiniCore's one
           */
          
          //#define MY_DEBUG 
          
          #define MY_RADIO_RF24
          #include <MySensors.h>  
          
          
          #include <DallasTemperature.h>
          #include <OneWire.h>
          #define ONE_WIRE_BUS 3 // Pin E/S de mesure 
          OneWire oneWire(ONE_WIRE_BUS); // Instanciation du OneWire 
          DallasTemperature sensors(&oneWire); // Passage de l'instance du OneWire à Dallas Temperature.
          
          
          MyMessage msg(0,V_TEMP); // Init temp msg
          
          void before()
          {
              sensors.begin();// démarre le OneWire
          }
          
          void setup()  
          {  
          }
          
          void presentation() 
          {
            sendSketchInfo("Temperature Sensor Test", "GB.1.0");
            present(0, S_TEMP);
          }
          
          void loop()     
          {     
              float (temperature) = sensors.getTempCByIndex(0);   // acquisition du résultat
              temperature = float(int(temperature * 10)) / 10;    // cast pour 1 seul chiffre après la virgule
              send(msg.setSensor(0).set(temperature,1)); 
              sensors.requestTemperatures(); // ordre de mesure  
              // ************Sleeping test ***************
              #ifdef MY_DEBUG 
                  delay(10000); // 10 secondes
              #else
                  sleep(10000);
              #endif    
          }
          

          and then this one

          // Simplest test to to highlight my problèm
          // Ordinary delay function used on DEBUG
          // Sleep is used without DEBUG
          // Successiv Serial prints should be printed if loop entered
          //************************************************
          /*
           Without DEBUG Serial monitor screen copy
           
           ⸮⸮ `_⸮       ⸮ߟ⸮
          ⸮  ⸮o  ⸮⸮   ⸮/ _⸮⸮⸮` ⸮⸮⸮ ⸮ ⸮⸮ `ߟ⸮  ⸮⸮⸮  ⸮ ⸮⸮`⸮⸮⸮
          ⸮ ⸮⸮/⸮ ⸮ ⸮ ⸮ ⸮_⸮⸮ ⸮ / ⸮ ⸮ `⸮ ⸮/ ⸮⸮⸮/ ⸮`⸮⸮ ⸮⸮⸮/ ⸮⸮⸮
          ⸮ ⸮  ⸮`⸮ ⸮⸮⸮ ⸮⸮⸮⸮⸮ ⸮  ⸮⸮/`⸮ ⸮ ⸮⸮⸮ ⸮ `⸮  ⸮ ⸮ `⸮⸮⸮`⸮
          ⸮⸮⸮  ⸮_⸮⸮⸮⸮, |⸮_⸮⸮/ ⸮⸮ߟ⸮⸮⸮ ⸮⸮⸮_⸮⸮/⸮⸮⸮_/⸮⸮⸮  ⸮⸮⸮⸮/
                  ⸮⸮ߟ/`                    `2.3.2
          
          ⸮é⸮u⸮ ⸮⸮ ⸮⸮⸮⸮
          :. 
           ⸮⸮  ⸮⸮       ⸮ߟ⸮
          ⸮  ⸮/  ⸮⸮   ⸮/ ⸮⸮⸮⸮  ⸮⸮⸮ ⸮ ⸮⸮  ߟ⸮  ⸮⸮⸮  ⸮ ⸮⸮ ⸮_⸮
          ⸮ ⸮⸮/⸮ ⸮ ⸮`⸮ ܟ⸮⸮ ⸮ / ⸮ ⸮ ⸮⸮`⸮/`⸮⸮⸮/ ⸮ ⸮⸮ ⸮ߟ/ ⸮⸮⸮
          ⸮`⸮ `⸮`⸮ ⸮⸮⸮ ⸮⸮⸮⸮⸮ ⸮ `ߟ/ ⸮`⸮`ܟ⸮ ⸮ `⸮` ⸮ ⸮  ܟ⸮ ⸮
          ⸮⸮⸮ `⸮⸮⸮⸮⸮⸮, ⸮⸮⸮⸮⸮/ ⸮⸮ߟ⸮⸮⸮ ⸮⸮⸮⸮ߟ/ܟ⸮⸮o⸮⸮⸮` ⸮⸮⸮⸮o
           `  ` ` ⸮⸮ߟo`` `  `  `  ``        2.3.2
          
          ⸮⸮i⸮⸮⸮`⸮⸮`⸮⸮⸮⸮
          :. 
           ⸮⸮  ⸮⸮       ⸮⸮⸮⸮
          ⸮  ⸮/` ⸮⸮ ` ⸮/ ⸮ߟ⸮  ⸮⸮⸮`⸮ ߟ `⸮ߟ `⸮⸮⸮ `⸮`⸮⸮ ⸮ߟ
          ⸮ ⸮⸮/⸮ ⸮ ⸮ ⸮ ⸮ߟ⸮ ⸮ / ⸮ ⸮ ⸮⸮ ⸮o`ߟ⸮/`⸮`⸮⸮ ⸮ߟo ⸮⸮⸮
          ⸮`⸮  ⸮ ⸮ ⸮⸮⸮ ⸮_⸮⸮⸮`⸮``⸮⸮/`⸮ ⸮ ⸮⸮⸮ ⸮ `⸮` ⸮`⸮ `⸮ߟ`⸮
          ⸮⸮⸮` ⸮⸮⸮⸮ߟl`⸮⸮⸮⸮⸮o`⸮ߟ⸮⸮⸮⸮ ⸮⸮⸮ߟ⸮/⸮⸮⸮⸮o⸮⸮⸮ `⸮⸮⸮⸮/
           `      ⸮⸮⸮⸮/   `   ``` ```        2.3.r
          
          etc....
          *******************************************************
          * With DEBUG Serial monitor screen copy
           
           ⸮⸮  ⸮⸮       ⸮⸮⸮⸮
          ⸮  ⸮/  ⸮⸮`  ⸮/ ⸮⸮⸮⸮  ߟ⸮`⸮ ⸮⸮` ⸮⸮⸮  ߟ⸮` ⸮ ⸮⸮`⸮⸮⸮
          ⸮ ⸮⸮o⸮ ⸮ ⸮ ⸮ ⸮_⸮⸮ \ / ⸮ ⸮ ⸮_ ⸮/ ⸮⸮⸮/ ⸮ ⸮| ⸮⸮⸮o ⸮⸮⸮
          ⸮ ⸮` ⸮`⸮ ⸮⸮⸮ ⸮⸮_⸮⸮ ⸮  ⸮⸮/ ⸮ ⸮ ⸮⸮⸮`⸮  ⸮ `⸮`⸮` ⸮ߟ ⸮
          ⸮⸮⸮` ⸮⸮⸮ܟ⸮,`⸮⸮ߟ⸮o ⸮ߟ⸮⸮⸮⸮`⸮⸮⸮⸮⸮⸮/\⸮⸮⸮o⸮⸮⸮` ⸮ߟ⸮/
                  ⸮ߟ⸮/ ` ` `                2.3.2
          
          16 ̓⸮:⸮⸮⸮:⸮Ή⸮`⸮⸮⸮⸮,⸮⸮=⸮Ύ΁---,⸮Q=8,⸮⸮⸮=2u5,⸮E⸮=2.3.2
          28 ⸮⸮⸮:⸮⸮⸮⸮
          28 T⸮⸮:⸮⸮⸮:⸮⸮=0
          s6`⸮⸮⸮:⸮Ή⸮:⸮Ӑ ⸮⸮
          38`⸮⸮⸮:⸮I⸮:⸮K,⸮D=25
          40 ⸮⸮⸮z⸮Ё⸮
          45 ?⸮⸮⸮z⸮⸮⸮:⸮⸮⸮⸮,25-25-255-255,⸮=255,⸮=3,⸮=7,⸮t=0,l=0,⸮⸮}0l⸮⸮}0,⸮⸮=⸮⸮:
          10t0`ԓ⸮:⸮⸮⸮:⸮⸮⸮⸮,0-0-25,⸮=255,⸮}3,⸮=x,⸮⸮=1,⸮=1,sg=0:0
          1046 T⸮⸮:⸮⸮⸮:⸮⸮⸮R ⸮⸮,Ʉ=0,⸮=1
          20u4 ⸮⸮⸮:⸮Ё⸮zϋ
          2054 ⸮S⸮:⸮⸮
          2056 ⸮⸮⸮:⸮⸮:⸮⸮
          2058 ԓ⸮:⸮Ќ
          2064 ⸮⸮⸮:⸮⸮⸮:⸮⸮⸮⸮,25-25-0-0,⸮=255l⸮=s,⸮}24l⸮⸮=1,⸮=q,⸮⸮=0,⸮⸮=0l⸮⸮=⸮⸮:1
          2076 ⸮⸮⸮:⸮S⸮:⸮⸮⸮⸮,0-0-25,⸮=255l⸮=3,⸮=25,⸮⸮=1,⸮=1,⸮⸮=0:1
          2082 ⸮S⸮:⸮⸮⸮:⸮⸮⸮⸮ ⸮⸮C⸮,H⸮=1
          2084 ⸮⸮⸮zՐ⸮z⸮⸮
          2086 ⸮⸮⸮:⸮⸮⸮ę:⸮⸮=25,⸮⸮⸮=0,⸮⸮⸮=1
          2099 ⸮⸮⸮:⸮⸮⸮:⸮⸮⸮⸮,25-25-0-0,⸮=255,⸮=3,t=15,⸮⸮=6,⸮=2,⸮⸮=0,⸮⸮=0,⸮⸮=⸮⸮:0100
          2107 ⸮S⸮:⸮Ӈ:⸮Ł⸮,0-0-25,⸮=255,⸮=3,⸮=q5,⸮⸮}6l⸮}2,⸮⸮}0z0q00
          2117 ⸮⸮⸮:⸮Ӈ:⸮Ŏ⸮,ru-25-0m0,⸮=255,⸮=0,⸮=17,⸮⸮=0,⸮}5,⸮⸮}p,⸮⸮=p,⸮⸮}⸮⸮:2.3.2
          21r9 ⸮⸮⸮:⸮⸮⸮:⸮⸮⸮⸮,25-25-0-0,⸮=255,⸮=3,⸮=6,⸮⸮=1,⸮=1,⸮⸮}0,⸮⸮=0l⸮⸮=⸮⸮:p
          2142 ⸮⸮⸮:M⸮⸮:⸮E⸮⸮,p-p-25,⸮=255,⸮}sl⸮}vl⸮⸮}0,⸮=1,s⸮=0:⸮
          2154 ⸮⸮⸮:⸮⸮⸮:⸮⸮⸮⸮,25-25-0-0,⸮=r55,⸮=3,⸮=11,⸮⸮=0,⸮}9,⸮⸮=0l⸮⸮=0,⸮⸮}⸮⸮z⸮⸮⸮⸮ ⸮⸮⸮⸮
          r1v6 ⸮⸮⸮:⸮⸮⸮:⸮⸮⸮⸮,25m25-0-0l⸮=r55,⸮=3,⸮=12,pt=0,⸮}6l⸮⸮=p,⸮⸮=0,⸮⸮=⸮⸮:⸮⸮.2np
          217t ̓⸮z⸮⸮⸮:⸮⸮Q
          2179 ⸮⸮⸮:M⸮⸮:⸮⸮⸮⸮,25-25-0-0,⸮=255,⸮=3,⸮=26,⸮⸮=1,l=1,⸮⸮=0,⸮⸮=0,⸮⸮}ϋ:2
          2187 ԓ⸮:͓⸮:⸮Ł⸮,p-0m2u,⸮=25u,⸮}3,⸮=27l⸮⸮=1,l=1,⸮⸮=0z1
          r1ys ⸮⸮⸮:Љ⸮z⸮⸮ą`⸮Ň=q
          2q97`⸮⸮⸮:⸮G⸮:⸮T⸮
          ⸮⸮)⸮⸮⸮ ⸮⸮ ⸮⸮⸮⸮
          2199 ̓⸮z‡⸮:⸮⸮⸮T ⸮⸮,⸮⸮⸮=1
          :.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.
           */
          
          #define MY_DEBUG 
          #define MY_RADIO_RF24
          #include <MySensors.h>
          #include <DallasTemperature.h>
          #include <OneWire.h>
          
          void setup() 
          {
            Serial.begin(115200);                 
            Serial.println ("Début du test"); 
          }
          
          void presentation()
          {  
            sendSketchInfo("Test Prgm", "GB.2.0"); // Send the sketch version information to the gateway and Controller
          }
          void loop()
          { 
          Serial.print (":.");   
          #ifdef MY_DEBUG 
                  delay(10000); // 10 secondes
          #else
                  sleep(10000);
          #endif    
          }
          

          I have included the Domoticz log in the 1st one and the serial monitor report for the 2nd.

          You can see, if "delay(xxx)" is in use, all's Okay, but if "sleep(xxx) is employed, the sketch is cycling in both sketches....
          What is happening?

          Prog.setup

          Test setup

          YveauxY 1 Reply Last reply
          0
          • G Gilles BILLARD

            Hy guys; So sorry but the procedure ran just once :-/
            When I reproammed my soldred Pro-Minis (via the radio socket + 1 air wire to the reset pin) none was running as expected; The issue was a kind of permanent reboot..????
            I tried to burn the MinCore bootloader and load my sketch into several brand new boards and the result was the same...
            So I simplified and simplified again the sketches until this one:

            
            /*This sketch is cycling wether you comment MY-DEBUG.....
            SERIAL MONITOR report: 
                      2021-04-04 17:20:04.426 Status: MySensors: Node: 20, Sketch Name: Temperature Sensor Test
                      2021-04-04 17:20:04.426 Status: MySensors: Node: 20, Sketch Version: G.B.
                      2021-04-04 17:20:15.378 (GiBi-Home) Temp (Temptest)
                      2021-04-04 17:20:15.368 Status: MySensors: Node: 20, Sketch Name: Temperature Sensor Test
                      2021-04-04 17:20:15.368 Status: MySensors: Node: 20, Sketch Version: G.B.
                      .
                      .
                      .
                      
            ......or running as it should do if you uncomment MY-DEBUG
            SERIAL MONITOR report: 
                      2021-04-04 17:22:52.558 Status: MySensors: Node: 20, Sketch Name: Temperature Sensor Test
                      2021-04-04 17:22:52.558 Status: MySensors: Node: 20, Sketch Version: G.B.
                      2021-04-04 17:23:02.654 (GiBi-Home) Temp (Temptest)
                      2021-04-04 17:23:12.717 (GiBi-Home) Temp (Temptest)
                      2021-04-04 17:23:22.781 (GiBi-Home) Temp (Temptest)
                      .
                      .
                      .
            NOTA: wether bootLoader is ordinary AVR bootloader or MiniCore's one
             */
            
            //#define MY_DEBUG 
            
            #define MY_RADIO_RF24
            #include <MySensors.h>  
            
            
            #include <DallasTemperature.h>
            #include <OneWire.h>
            #define ONE_WIRE_BUS 3 // Pin E/S de mesure 
            OneWire oneWire(ONE_WIRE_BUS); // Instanciation du OneWire 
            DallasTemperature sensors(&oneWire); // Passage de l'instance du OneWire à Dallas Temperature.
            
            
            MyMessage msg(0,V_TEMP); // Init temp msg
            
            void before()
            {
                sensors.begin();// démarre le OneWire
            }
            
            void setup()  
            {  
            }
            
            void presentation() 
            {
              sendSketchInfo("Temperature Sensor Test", "GB.1.0");
              present(0, S_TEMP);
            }
            
            void loop()     
            {     
                float (temperature) = sensors.getTempCByIndex(0);   // acquisition du résultat
                temperature = float(int(temperature * 10)) / 10;    // cast pour 1 seul chiffre après la virgule
                send(msg.setSensor(0).set(temperature,1)); 
                sensors.requestTemperatures(); // ordre de mesure  
                // ************Sleeping test ***************
                #ifdef MY_DEBUG 
                    delay(10000); // 10 secondes
                #else
                    sleep(10000);
                #endif    
            }
            

            and then this one

            // Simplest test to to highlight my problèm
            // Ordinary delay function used on DEBUG
            // Sleep is used without DEBUG
            // Successiv Serial prints should be printed if loop entered
            //************************************************
            /*
             Without DEBUG Serial monitor screen copy
             
             ⸮⸮ `_⸮       ⸮ߟ⸮
            ⸮  ⸮o  ⸮⸮   ⸮/ _⸮⸮⸮` ⸮⸮⸮ ⸮ ⸮⸮ `ߟ⸮  ⸮⸮⸮  ⸮ ⸮⸮`⸮⸮⸮
            ⸮ ⸮⸮/⸮ ⸮ ⸮ ⸮ ⸮_⸮⸮ ⸮ / ⸮ ⸮ `⸮ ⸮/ ⸮⸮⸮/ ⸮`⸮⸮ ⸮⸮⸮/ ⸮⸮⸮
            ⸮ ⸮  ⸮`⸮ ⸮⸮⸮ ⸮⸮⸮⸮⸮ ⸮  ⸮⸮/`⸮ ⸮ ⸮⸮⸮ ⸮ `⸮  ⸮ ⸮ `⸮⸮⸮`⸮
            ⸮⸮⸮  ⸮_⸮⸮⸮⸮, |⸮_⸮⸮/ ⸮⸮ߟ⸮⸮⸮ ⸮⸮⸮_⸮⸮/⸮⸮⸮_/⸮⸮⸮  ⸮⸮⸮⸮/
                    ⸮⸮ߟ/`                    `2.3.2
            
            ⸮é⸮u⸮ ⸮⸮ ⸮⸮⸮⸮
            :. 
             ⸮⸮  ⸮⸮       ⸮ߟ⸮
            ⸮  ⸮/  ⸮⸮   ⸮/ ⸮⸮⸮⸮  ⸮⸮⸮ ⸮ ⸮⸮  ߟ⸮  ⸮⸮⸮  ⸮ ⸮⸮ ⸮_⸮
            ⸮ ⸮⸮/⸮ ⸮ ⸮`⸮ ܟ⸮⸮ ⸮ / ⸮ ⸮ ⸮⸮`⸮/`⸮⸮⸮/ ⸮ ⸮⸮ ⸮ߟ/ ⸮⸮⸮
            ⸮`⸮ `⸮`⸮ ⸮⸮⸮ ⸮⸮⸮⸮⸮ ⸮ `ߟ/ ⸮`⸮`ܟ⸮ ⸮ `⸮` ⸮ ⸮  ܟ⸮ ⸮
            ⸮⸮⸮ `⸮⸮⸮⸮⸮⸮, ⸮⸮⸮⸮⸮/ ⸮⸮ߟ⸮⸮⸮ ⸮⸮⸮⸮ߟ/ܟ⸮⸮o⸮⸮⸮` ⸮⸮⸮⸮o
             `  ` ` ⸮⸮ߟo`` `  `  `  ``        2.3.2
            
            ⸮⸮i⸮⸮⸮`⸮⸮`⸮⸮⸮⸮
            :. 
             ⸮⸮  ⸮⸮       ⸮⸮⸮⸮
            ⸮  ⸮/` ⸮⸮ ` ⸮/ ⸮ߟ⸮  ⸮⸮⸮`⸮ ߟ `⸮ߟ `⸮⸮⸮ `⸮`⸮⸮ ⸮ߟ
            ⸮ ⸮⸮/⸮ ⸮ ⸮ ⸮ ⸮ߟ⸮ ⸮ / ⸮ ⸮ ⸮⸮ ⸮o`ߟ⸮/`⸮`⸮⸮ ⸮ߟo ⸮⸮⸮
            ⸮`⸮  ⸮ ⸮ ⸮⸮⸮ ⸮_⸮⸮⸮`⸮``⸮⸮/`⸮ ⸮ ⸮⸮⸮ ⸮ `⸮` ⸮`⸮ `⸮ߟ`⸮
            ⸮⸮⸮` ⸮⸮⸮⸮ߟl`⸮⸮⸮⸮⸮o`⸮ߟ⸮⸮⸮⸮ ⸮⸮⸮ߟ⸮/⸮⸮⸮⸮o⸮⸮⸮ `⸮⸮⸮⸮/
             `      ⸮⸮⸮⸮/   `   ``` ```        2.3.r
            
            etc....
            *******************************************************
            * With DEBUG Serial monitor screen copy
             
             ⸮⸮  ⸮⸮       ⸮⸮⸮⸮
            ⸮  ⸮/  ⸮⸮`  ⸮/ ⸮⸮⸮⸮  ߟ⸮`⸮ ⸮⸮` ⸮⸮⸮  ߟ⸮` ⸮ ⸮⸮`⸮⸮⸮
            ⸮ ⸮⸮o⸮ ⸮ ⸮ ⸮ ⸮_⸮⸮ \ / ⸮ ⸮ ⸮_ ⸮/ ⸮⸮⸮/ ⸮ ⸮| ⸮⸮⸮o ⸮⸮⸮
            ⸮ ⸮` ⸮`⸮ ⸮⸮⸮ ⸮⸮_⸮⸮ ⸮  ⸮⸮/ ⸮ ⸮ ⸮⸮⸮`⸮  ⸮ `⸮`⸮` ⸮ߟ ⸮
            ⸮⸮⸮` ⸮⸮⸮ܟ⸮,`⸮⸮ߟ⸮o ⸮ߟ⸮⸮⸮⸮`⸮⸮⸮⸮⸮⸮/\⸮⸮⸮o⸮⸮⸮` ⸮ߟ⸮/
                    ⸮ߟ⸮/ ` ` `                2.3.2
            
            16 ̓⸮:⸮⸮⸮:⸮Ή⸮`⸮⸮⸮⸮,⸮⸮=⸮Ύ΁---,⸮Q=8,⸮⸮⸮=2u5,⸮E⸮=2.3.2
            28 ⸮⸮⸮:⸮⸮⸮⸮
            28 T⸮⸮:⸮⸮⸮:⸮⸮=0
            s6`⸮⸮⸮:⸮Ή⸮:⸮Ӑ ⸮⸮
            38`⸮⸮⸮:⸮I⸮:⸮K,⸮D=25
            40 ⸮⸮⸮z⸮Ё⸮
            45 ?⸮⸮⸮z⸮⸮⸮:⸮⸮⸮⸮,25-25-255-255,⸮=255,⸮=3,⸮=7,⸮t=0,l=0,⸮⸮}0l⸮⸮}0,⸮⸮=⸮⸮:
            10t0`ԓ⸮:⸮⸮⸮:⸮⸮⸮⸮,0-0-25,⸮=255,⸮}3,⸮=x,⸮⸮=1,⸮=1,sg=0:0
            1046 T⸮⸮:⸮⸮⸮:⸮⸮⸮R ⸮⸮,Ʉ=0,⸮=1
            20u4 ⸮⸮⸮:⸮Ё⸮zϋ
            2054 ⸮S⸮:⸮⸮
            2056 ⸮⸮⸮:⸮⸮:⸮⸮
            2058 ԓ⸮:⸮Ќ
            2064 ⸮⸮⸮:⸮⸮⸮:⸮⸮⸮⸮,25-25-0-0,⸮=255l⸮=s,⸮}24l⸮⸮=1,⸮=q,⸮⸮=0,⸮⸮=0l⸮⸮=⸮⸮:1
            2076 ⸮⸮⸮:⸮S⸮:⸮⸮⸮⸮,0-0-25,⸮=255l⸮=3,⸮=25,⸮⸮=1,⸮=1,⸮⸮=0:1
            2082 ⸮S⸮:⸮⸮⸮:⸮⸮⸮⸮ ⸮⸮C⸮,H⸮=1
            2084 ⸮⸮⸮zՐ⸮z⸮⸮
            2086 ⸮⸮⸮:⸮⸮⸮ę:⸮⸮=25,⸮⸮⸮=0,⸮⸮⸮=1
            2099 ⸮⸮⸮:⸮⸮⸮:⸮⸮⸮⸮,25-25-0-0,⸮=255,⸮=3,t=15,⸮⸮=6,⸮=2,⸮⸮=0,⸮⸮=0,⸮⸮=⸮⸮:0100
            2107 ⸮S⸮:⸮Ӈ:⸮Ł⸮,0-0-25,⸮=255,⸮=3,⸮=q5,⸮⸮}6l⸮}2,⸮⸮}0z0q00
            2117 ⸮⸮⸮:⸮Ӈ:⸮Ŏ⸮,ru-25-0m0,⸮=255,⸮=0,⸮=17,⸮⸮=0,⸮}5,⸮⸮}p,⸮⸮=p,⸮⸮}⸮⸮:2.3.2
            21r9 ⸮⸮⸮:⸮⸮⸮:⸮⸮⸮⸮,25-25-0-0,⸮=255,⸮=3,⸮=6,⸮⸮=1,⸮=1,⸮⸮}0,⸮⸮=0l⸮⸮=⸮⸮:p
            2142 ⸮⸮⸮:M⸮⸮:⸮E⸮⸮,p-p-25,⸮=255,⸮}sl⸮}vl⸮⸮}0,⸮=1,s⸮=0:⸮
            2154 ⸮⸮⸮:⸮⸮⸮:⸮⸮⸮⸮,25-25-0-0,⸮=r55,⸮=3,⸮=11,⸮⸮=0,⸮}9,⸮⸮=0l⸮⸮=0,⸮⸮}⸮⸮z⸮⸮⸮⸮ ⸮⸮⸮⸮
            r1v6 ⸮⸮⸮:⸮⸮⸮:⸮⸮⸮⸮,25m25-0-0l⸮=r55,⸮=3,⸮=12,pt=0,⸮}6l⸮⸮=p,⸮⸮=0,⸮⸮=⸮⸮:⸮⸮.2np
            217t ̓⸮z⸮⸮⸮:⸮⸮Q
            2179 ⸮⸮⸮:M⸮⸮:⸮⸮⸮⸮,25-25-0-0,⸮=255,⸮=3,⸮=26,⸮⸮=1,l=1,⸮⸮=0,⸮⸮=0,⸮⸮}ϋ:2
            2187 ԓ⸮:͓⸮:⸮Ł⸮,p-0m2u,⸮=25u,⸮}3,⸮=27l⸮⸮=1,l=1,⸮⸮=0z1
            r1ys ⸮⸮⸮:Љ⸮z⸮⸮ą`⸮Ň=q
            2q97`⸮⸮⸮:⸮G⸮:⸮T⸮
            ⸮⸮)⸮⸮⸮ ⸮⸮ ⸮⸮⸮⸮
            2199 ̓⸮z‡⸮:⸮⸮⸮T ⸮⸮,⸮⸮⸮=1
            :.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.
             */
            
            #define MY_DEBUG 
            #define MY_RADIO_RF24
            #include <MySensors.h>
            #include <DallasTemperature.h>
            #include <OneWire.h>
            
            void setup() 
            {
              Serial.begin(115200);                 
              Serial.println ("Début du test"); 
            }
            
            void presentation()
            {  
              sendSketchInfo("Test Prgm", "GB.2.0"); // Send the sketch version information to the gateway and Controller
            }
            void loop()
            { 
            Serial.print (":.");   
            #ifdef MY_DEBUG 
                    delay(10000); // 10 secondes
            #else
                    sleep(10000);
            #endif    
            }
            

            I have included the Domoticz log in the 1st one and the serial monitor report for the 2nd.

            You can see, if "delay(xxx)" is in use, all's Okay, but if "sleep(xxx) is employed, the sketch is cycling in both sketches....
            What is happening?

            Prog.setup

            Test setup

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

            @Gilles-BILLARD what pro minis are you using? The 3v3 version only goes to 57600 baud, so 115200 is likely too much

            http://yveaux.blogspot.nl

            G 1 Reply Last reply
            0
            • YveauxY Yveaux

              @Gilles-BILLARD what pro minis are you using? The 3v3 version only goes to 57600 baud, so 115200 is likely too much

              G Offline
              G Offline
              Gilles BILLARD
              wrote on last edited by
              #323

              @Yveaux Yes Yveaux, you're probably righ, but, if I use AVR bootloader and Test Nb 2 the serial monitor says:

               
               __  __       ____
              |  \/  |_   _/ ___|  ___ _ __  ___  ___  _ __ ___
              | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
              | |  | | |_| |___| |  __/ | | \__ \  _  | |  \__ \
              |_|  |_|\__, |____/ \___|_| |_|___/\___/|_|  |___/
                      |___/                      2.3.2
              
              16 MCO:BGN:INIT NODE,CP=RNNNA---,FQ=8,REL=255,VER=2.3.2
              28 TSM:INIT
              28 TSF:WUR:MS=0
              36 TSM:INIT:TSP OK
              38 TSF:SID:OK,ID=20
              40 TSM:FPAR
              45 ?TSF:MSG:SEND,20-20-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
              657 TSF:MSG:READ,0-0-20,s=255,c=3,t=8,pt=1,l=1,sg=0:0
              663 TSF:MSG:FPAR OK,ID=0,D=1
              2054 TSM:FPAR:OK
              2054 TSM:ID
              2056 TSM:ID:OK
              2058 TSM:UPL
              2062 TSF:MSG:SEND,20-20-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1
              2070 TSF:MSG:READ,0-0-20,s=255,c=3,t=25,pt=1,l=1,sg=0:1
              2076 TSF:MSG:PONG RECV,HP=1
              2080 TSM:UPL:OK
              2082 TSM:READY:ID=20,PAR=0,DIS=1
              2086 TSF:MSG:SEND,20-20-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
              2095 TSF:MSG:READ,0-0-20,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
              2105 TSF:MSG:SEND,20-20-0-0,s=255,c=0,t=17,pt=0,l=5,sg=0,ft=0,st=OK:2.3.2
              2115 TSF:MSG:SEND,20-20-0-0,s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=OK:0
              2125 TSF:MSG:READ,0-0-20,s=255,c=3,t=6,pt=0,l=1,sg=0:M
              2134 TSF:MSG:SEND,20-20-0-0,s=255,c=3,t=11,pt=0,l=9,sg=0,ft=0,st=OK:Test Prgm
              2146 TSF:MSG:SEND,20-20-0-0,s=255,c=3,t=12,pt=0,l=6,sg=0,ft=0,st=OK:GB.2.0
              2154 MCO:REG:REQ
              2156 TSF:MSG:SEND,20-20-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=OK:2
              2164 TSF:MSG:READ,0-0-20,s=255,c=3,t=27,pt=1,l=1,sg=0:1
              2170 MCO:PIM:NODE REG=1
              2174 MCO:BGN:STP
              Début du test
              2177 MCO:BGN:INIT OK,TSP=1
              :.:.:.:.:.:.:.:.:.:.:.:.:.:.:. 
              

              and Domoticz log is:

              2021-04-08 08:08:24.328 Status: MySensors: Node: 20, Sketch Name: Test Prgm
              2021-04-08 08:08:24.329 Status: MySensors: Node: 20, Sketch Version: GB.2.0
              

              NB: On the Sérial monitor, only the last line matters

              One more point: Once the Pro-Minis are burnt with MiniCore library, I'm not able to revert on standard AVR bootloader; They are somehow bricked on MiniCore bootloader

              G skywatchS 2 Replies Last reply
              0
              • G Gilles BILLARD

                @Yveaux Yes Yveaux, you're probably righ, but, if I use AVR bootloader and Test Nb 2 the serial monitor says:

                 
                 __  __       ____
                |  \/  |_   _/ ___|  ___ _ __  ___  ___  _ __ ___
                | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
                | |  | | |_| |___| |  __/ | | \__ \  _  | |  \__ \
                |_|  |_|\__, |____/ \___|_| |_|___/\___/|_|  |___/
                        |___/                      2.3.2
                
                16 MCO:BGN:INIT NODE,CP=RNNNA---,FQ=8,REL=255,VER=2.3.2
                28 TSM:INIT
                28 TSF:WUR:MS=0
                36 TSM:INIT:TSP OK
                38 TSF:SID:OK,ID=20
                40 TSM:FPAR
                45 ?TSF:MSG:SEND,20-20-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
                657 TSF:MSG:READ,0-0-20,s=255,c=3,t=8,pt=1,l=1,sg=0:0
                663 TSF:MSG:FPAR OK,ID=0,D=1
                2054 TSM:FPAR:OK
                2054 TSM:ID
                2056 TSM:ID:OK
                2058 TSM:UPL
                2062 TSF:MSG:SEND,20-20-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1
                2070 TSF:MSG:READ,0-0-20,s=255,c=3,t=25,pt=1,l=1,sg=0:1
                2076 TSF:MSG:PONG RECV,HP=1
                2080 TSM:UPL:OK
                2082 TSM:READY:ID=20,PAR=0,DIS=1
                2086 TSF:MSG:SEND,20-20-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
                2095 TSF:MSG:READ,0-0-20,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
                2105 TSF:MSG:SEND,20-20-0-0,s=255,c=0,t=17,pt=0,l=5,sg=0,ft=0,st=OK:2.3.2
                2115 TSF:MSG:SEND,20-20-0-0,s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=OK:0
                2125 TSF:MSG:READ,0-0-20,s=255,c=3,t=6,pt=0,l=1,sg=0:M
                2134 TSF:MSG:SEND,20-20-0-0,s=255,c=3,t=11,pt=0,l=9,sg=0,ft=0,st=OK:Test Prgm
                2146 TSF:MSG:SEND,20-20-0-0,s=255,c=3,t=12,pt=0,l=6,sg=0,ft=0,st=OK:GB.2.0
                2154 MCO:REG:REQ
                2156 TSF:MSG:SEND,20-20-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=OK:2
                2164 TSF:MSG:READ,0-0-20,s=255,c=3,t=27,pt=1,l=1,sg=0:1
                2170 MCO:PIM:NODE REG=1
                2174 MCO:BGN:STP
                Début du test
                2177 MCO:BGN:INIT OK,TSP=1
                :.:.:.:.:.:.:.:.:.:.:.:.:.:.:. 
                

                and Domoticz log is:

                2021-04-08 08:08:24.328 Status: MySensors: Node: 20, Sketch Name: Test Prgm
                2021-04-08 08:08:24.329 Status: MySensors: Node: 20, Sketch Version: GB.2.0
                

                NB: On the Sérial monitor, only the last line matters

                One more point: Once the Pro-Minis are burnt with MiniCore library, I'm not able to revert on standard AVR bootloader; They are somehow bricked on MiniCore bootloader

                G Offline
                G Offline
                Gilles BILLARD
                wrote on last edited by
                #324

                @Gilles-BILLARD
                Update: Today, using Arduino UNO as ISP (instead of a ProMini as ISP), I was able to "unbrick" one Pro-Mini and revert to standard AVR bootloader

                1 Reply Last reply
                0
                • G Gilles BILLARD

                  @Yveaux Yes Yveaux, you're probably righ, but, if I use AVR bootloader and Test Nb 2 the serial monitor says:

                   
                   __  __       ____
                  |  \/  |_   _/ ___|  ___ _ __  ___  ___  _ __ ___
                  | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
                  | |  | | |_| |___| |  __/ | | \__ \  _  | |  \__ \
                  |_|  |_|\__, |____/ \___|_| |_|___/\___/|_|  |___/
                          |___/                      2.3.2
                  
                  16 MCO:BGN:INIT NODE,CP=RNNNA---,FQ=8,REL=255,VER=2.3.2
                  28 TSM:INIT
                  28 TSF:WUR:MS=0
                  36 TSM:INIT:TSP OK
                  38 TSF:SID:OK,ID=20
                  40 TSM:FPAR
                  45 ?TSF:MSG:SEND,20-20-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
                  657 TSF:MSG:READ,0-0-20,s=255,c=3,t=8,pt=1,l=1,sg=0:0
                  663 TSF:MSG:FPAR OK,ID=0,D=1
                  2054 TSM:FPAR:OK
                  2054 TSM:ID
                  2056 TSM:ID:OK
                  2058 TSM:UPL
                  2062 TSF:MSG:SEND,20-20-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1
                  2070 TSF:MSG:READ,0-0-20,s=255,c=3,t=25,pt=1,l=1,sg=0:1
                  2076 TSF:MSG:PONG RECV,HP=1
                  2080 TSM:UPL:OK
                  2082 TSM:READY:ID=20,PAR=0,DIS=1
                  2086 TSF:MSG:SEND,20-20-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
                  2095 TSF:MSG:READ,0-0-20,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
                  2105 TSF:MSG:SEND,20-20-0-0,s=255,c=0,t=17,pt=0,l=5,sg=0,ft=0,st=OK:2.3.2
                  2115 TSF:MSG:SEND,20-20-0-0,s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=OK:0
                  2125 TSF:MSG:READ,0-0-20,s=255,c=3,t=6,pt=0,l=1,sg=0:M
                  2134 TSF:MSG:SEND,20-20-0-0,s=255,c=3,t=11,pt=0,l=9,sg=0,ft=0,st=OK:Test Prgm
                  2146 TSF:MSG:SEND,20-20-0-0,s=255,c=3,t=12,pt=0,l=6,sg=0,ft=0,st=OK:GB.2.0
                  2154 MCO:REG:REQ
                  2156 TSF:MSG:SEND,20-20-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=OK:2
                  2164 TSF:MSG:READ,0-0-20,s=255,c=3,t=27,pt=1,l=1,sg=0:1
                  2170 MCO:PIM:NODE REG=1
                  2174 MCO:BGN:STP
                  Début du test
                  2177 MCO:BGN:INIT OK,TSP=1
                  :.:.:.:.:.:.:.:.:.:.:.:.:.:.:. 
                  

                  and Domoticz log is:

                  2021-04-08 08:08:24.328 Status: MySensors: Node: 20, Sketch Name: Test Prgm
                  2021-04-08 08:08:24.329 Status: MySensors: Node: 20, Sketch Version: GB.2.0
                  

                  NB: On the Sérial monitor, only the last line matters

                  One more point: Once the Pro-Minis are burnt with MiniCore library, I'm not able to revert on standard AVR bootloader; They are somehow bricked on MiniCore bootloader

                  skywatchS Offline
                  skywatchS Offline
                  skywatch
                  wrote on last edited by skywatch
                  #325

                  @Gilles-BILLARD Something is not right with either your set up (wiring etc), settings or installation of arduino IDE/libraries.

                  I just tested a 3V pro mini and was able to to back and forth freely between MiniCore and AVR bootloaders without issue. Two blinks for Minicore and one blink for AVR.

                  A USB programmer is usually cheaper than an uno, so why not try one and see. That is what I use and the only difference is less cabling and only one arduino in the mix.

                  In one photo you show nrf24 - are you using FOTA? Is this connected when bootloading the chip?

                  The error you described a week ago about optiboot should not happen and you should not need to change anything. Try reinstalling the MiniCore library again following the instructions to the letter. Have you in any way modified your boards.txt or changed your arduino ide from default settings or installation path in any way?

                  G 2 Replies Last reply
                  0
                  • skywatchS skywatch

                    @Gilles-BILLARD Something is not right with either your set up (wiring etc), settings or installation of arduino IDE/libraries.

                    I just tested a 3V pro mini and was able to to back and forth freely between MiniCore and AVR bootloaders without issue. Two blinks for Minicore and one blink for AVR.

                    A USB programmer is usually cheaper than an uno, so why not try one and see. That is what I use and the only difference is less cabling and only one arduino in the mix.

                    In one photo you show nrf24 - are you using FOTA? Is this connected when bootloading the chip?

                    The error you described a week ago about optiboot should not happen and you should not need to change anything. Try reinstalling the MiniCore library again following the instructions to the letter. Have you in any way modified your boards.txt or changed your arduino ide from default settings or installation path in any way?

                    G Offline
                    G Offline
                    Gilles BILLARD
                    wrote on last edited by Gilles BILLARD
                    #326

                    @skywatch When I try to use the red ISP (based on a FT232R ) you can see on the pictures I joined, I receive an error msg like :

                    avrdude: Version 6.3-20201216
                             Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
                             Copyright (c) 2007-2014 Joerg Wunsch
                    
                             System wide configuration file is "C:\Users\billa\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.1.1/avrdude.conf"
                    
                             Using Port                    : usb
                             Using Programmer              : usbasp
                    avrdude: error: could not find USB device with vid=0x16c0 pid=0x5dc vendor='www.fischl.de' product='USBasp'
                    
                    avrdude done.  Thank you
                    

                    That is the reason why I used or Po-Mini Or UNO as ISP.
                    I tried to change and test many others drivers for my FTDI (for 2 days) unsuccessfully

                    are you using FOTA? Is this connected when bootloading the chip? As you can see on one picture, in the programming section, NRF is NOT wired to the programmed Pro-Mini.
                    Neither it was when I tried to reprogram the wired Pro-mini because I was using the NRF socket to acces the Arduino pins.

                    .....or installation of arduino IDE/libraries I checked that as well and installed the new Adruino IDE 2.0.0 beta.... same problèms :-//

                    1 Reply Last reply
                    0
                    • skywatchS skywatch

                      @Gilles-BILLARD Something is not right with either your set up (wiring etc), settings or installation of arduino IDE/libraries.

                      I just tested a 3V pro mini and was able to to back and forth freely between MiniCore and AVR bootloaders without issue. Two blinks for Minicore and one blink for AVR.

                      A USB programmer is usually cheaper than an uno, so why not try one and see. That is what I use and the only difference is less cabling and only one arduino in the mix.

                      In one photo you show nrf24 - are you using FOTA? Is this connected when bootloading the chip?

                      The error you described a week ago about optiboot should not happen and you should not need to change anything. Try reinstalling the MiniCore library again following the instructions to the letter. Have you in any way modified your boards.txt or changed your arduino ide from default settings or installation path in any way?

                      G Offline
                      G Offline
                      Gilles BILLARD
                      wrote on last edited by
                      #327

                      @skywatch said in 💬 Battery Powered Sensors:

                      ....... Two blinks for Minicore and one blink for AVR.....>

                      Thay is not my case; 1 blink for AVR and NO BLINK for MiniCore !?!?!?

                      G 1 Reply Last reply
                      0
                      • G Gilles BILLARD

                        @skywatch said in 💬 Battery Powered Sensors:

                        ....... Two blinks for Minicore and one blink for AVR.....>

                        Thay is not my case; 1 blink for AVR and NO BLINK for MiniCore !?!?!?

                        G Offline
                        G Offline
                        Gilles BILLARD
                        wrote on last edited by
                        #328

                        @Gilles-BILLARD Now it is OKay with that blinks; 1 for AVR boot and 2 for MiniCore and I can revert from one to the other and vice-versa.
                        ( I removed all concerning MiniCore and reload it )
                        But sleep() is still giving the same issue

                        skywatchS 1 Reply Last reply
                        0
                        • G Gilles BILLARD

                          @Gilles-BILLARD Now it is OKay with that blinks; 1 for AVR boot and 2 for MiniCore and I can revert from one to the other and vice-versa.
                          ( I removed all concerning MiniCore and reload it )
                          But sleep() is still giving the same issue

                          skywatchS Offline
                          skywatchS Offline
                          skywatch
                          wrote on last edited by skywatch
                          #329

                          @Gilles-BILLARD You remembered to connect the nrf before going to sleep?

                          G 1 Reply Last reply
                          0
                          • skywatchS skywatch

                            @Gilles-BILLARD You remembered to connect the nrf before going to sleep?

                            G Offline
                            G Offline
                            Gilles BILLARD
                            wrote on last edited by Gilles BILLARD
                            #330

                            skywatch: You remembered to connect the nrf before going to sleep?
                            @skywatch Yes, of course;
                            I'm 67, retired, and after 9 days (part time) on this issue, I give up !
                            I am therefore torn between crushing all that stuff between between a big hammer and my anvil or to discard everything to the trash can.
                            These sensors are useless if consuming 20mA H24-7/7 because they they should normally be used outside (in my greenhouses) powered by a battery 18650 + a solar cell.

                            skywatchS 1 Reply Last reply
                            0
                            • G Offline
                              G Offline
                              Gilles BILLARD
                              wrote on last edited by Gilles BILLARD
                              #331

                              Can anyone let me know if he sees something wrong in that log after a Min-Core bootloader burn in a Pro-Mini 3.3v
                              (I do not!)
                              I ask because it not the same file as the 1st one (the 1st was including the nb "115200" (bauds?) and now it is "38400" )
                              NOTA: Directory is this one:

                              C:\Users\billa\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.1.1\bootloaders\optiboot_flash\bootloaders\atmega328p\8000000L
                              
                              
                              avrdude: Version 6.3-20201216
                                       Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
                                       Copyright (c) 2007-2014 Joerg Wunsch
                              
                                       System wide configuration file is "C:\Users\billa\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.1.1/avrdude.conf"
                              
                                       Using Port                    : COM8
                                       Using Programmer              : stk500v1
                                       Overriding Baud Rate          : 19200
                                       AVR Part                      : ATmega328P
                                       Chip Erase delay              : 9000 us
                                       PAGEL                         : PD7
                                       BS2                           : PC2
                                       RESET disposition             : dedicated
                                       RETRY pulse                   : SCK
                                       serial program mode           : yes
                                       parallel program mode         : yes
                                       Timeout                       : 200
                                       StabDelay                     : 100
                                       CmdexeDelay                   : 25
                                       SyncLoops                     : 32
                                       ByteDelay                     : 0
                                       PollIndex                     : 3
                                       PollValue                     : 0x53
                                       Memory Detail                 :
                              
                                                                Block Poll               Page                       Polled
                                         Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
                                         ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
                                         eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
                                         flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
                                         lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                         hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                         efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                         lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                         calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
                                         signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
                              
                                       Programmer Type : STK500
                                       Description     : Atmel STK500 Version 1.x firmware
                                       Hardware Version: 2
                                       Firmware Version: 1.18
                                       Topcard         : Unknown
                                       Vtarget         : 0.0 V
                                       Varef           : 0.0 V
                                       Oscillator      : Off
                                       SCK period      : 0.1 us
                              
                              avrdude: AVR device initialized and ready to accept instructions
                              
                              Reading | ################################################## | 100% 0.04s
                              
                              avrdude: Device signature = 0x1e950f (probably m328p)
                              avrdude: erasing chip
                              avrdude: reading input file "0x3f"
                              avrdude: writing lock (1 bytes):
                              
                              Writing | ################################################## | 100% 0.02s
                              
                              avrdude: 1 bytes of lock written
                              avrdude: verifying lock memory against 0x3f:
                              avrdude: load data lock data from input file 0x3f:
                              avrdude: input file 0x3f contains 1 bytes
                              avrdude: reading on-chip lock data:
                              
                              Reading | ################################################## | 100% 0.02s
                              
                              avrdude: verifying ...
                              avrdude: 1 bytes of lock verified
                              avrdude: reading input file "0b11111111"
                              avrdude: writing efuse (1 bytes):
                              
                              Writing | ################################################## | 100% 0.02s
                              
                              avrdude: 1 bytes of efuse written
                              avrdude: verifying efuse memory against 0b11111111:
                              avrdude: load data efuse data from input file 0b11111111:
                              avrdude: input file 0b11111111 contains 1 bytes
                              avrdude: reading on-chip efuse data:
                              
                              Reading | ################################################## | 100% 0.02s
                              
                              avrdude: verifying ...
                              avrdude: 1 bytes of efuse verified
                              avrdude: reading input file "0b11011110"
                              avrdude: writing hfuse (1 bytes):
                              
                              Writing | ################################################## | 100% 0.02s
                              
                              avrdude: 1 bytes of hfuse written
                              avrdude: verifying hfuse memory against 0b11011110:
                              avrdude: load data hfuse data from input file 0b11011110:
                              avrdude: input file 0b11011110 contains 1 bytes
                              avrdude: reading on-chip hfuse data:
                              
                              Reading | ################################################## | 100% 0.02s
                              
                              avrdude: verifying ...
                              avrdude: 1 bytes of hfuse verified
                              avrdude: reading input file "0xe2"
                              avrdude: writing lfuse (1 bytes):
                              
                              Writing | ################################################## | 100% 0.02s
                              
                              avrdude: 1 bytes of lfuse written
                              avrdude: verifying lfuse memory against 0xe2:
                              avrdude: load data lfuse data from input file 0xe2:
                              avrdude: input file 0xe2 contains 1 bytes
                              avrdude: reading on-chip lfuse data:
                              
                              Reading | ################################################## | 100% 0.01s
                              
                              avrdude: verifying ...
                              avrdude: 1 bytes of lfuse verified
                              
                              avrdude done.  Thank you.
                              
                              
                              avrdude: Version 6.3-20201216
                                       Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
                                       Copyright (c) 2007-2014 Joerg Wunsch
                              
                                       System wide configuration file is "C:\Users\billa\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.1.1/avrdude.conf"
                              
                                       Using Port                    : COM8
                                       Using Programmer              : stk500v1
                                       Overriding Baud Rate          : 19200
                                       AVR Part                      : ATmega328P
                                       Chip Erase delay              : 9000 us
                                       PAGEL                         : PD7
                                       BS2                           : PC2
                                       RESET disposition             : dedicated
                                       RETRY pulse                   : SCK
                                       serial program mode           : yes
                                       parallel program mode         : yes
                                       Timeout                       : 200
                                       StabDelay                     : 100
                                       CmdexeDelay                   : 25
                                       SyncLoops                     : 32
                                       ByteDelay                     : 0
                                       PollIndex                     : 3
                                       PollValue                     : 0x53
                                       Memory Detail                 :
                              
                                                                Block Poll               Page                       Polled
                                         Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
                                         ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
                                         eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
                                         flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
                                         lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                         hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                         efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                         lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                         calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
                                         signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
                              
                                       Programmer Type : STK500
                                       Description     : Atmel STK500 Version 1.x firmware
                                       Hardware Version: 2
                                       Firmware Version: 1.18
                                       Topcard         : Unknown
                                       Vtarget         : 0.0 V
                                       Varef           : 0.0 V
                                       Oscillator      : Off
                                       SCK period      : 0.1 us
                              
                              avrdude: AVR device initialized and ready to accept instructions
                              
                              Reading | ################################################## | 100% 0.05s
                              
                              avrdude: Device signature = 0x1e950f (probably m328p)
                              avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
                                       To disable this feature, specify the -D option.
                              avrdude: erasing chip
                              avrdude: reading input file "C:\Users\billa\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.1.1/bootloaders/optiboot_flash/bootloaders/atmega328p/8000000L/optiboot_flash_atmega328p_UART0_38400_8000000L_B5.hex"
                              avrdude: writing flash (32768 bytes):
                              
                              Writing | ################################################## | 100% 0.00s
                              
                              avrdude: 32768 bytes of flash written
                              avrdude: verifying flash memory against C:\Users\billa\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.1.1/bootloaders/optiboot_flash/bootloaders/atmega328p/8000000L/optiboot_flash_atmega328p_UART0_38400_8000000L_B5.hex:
                              avrdude: load data flash data from input file C:\Users\billa\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.1.1/bootloaders/optiboot_flash/bootloaders/atmega328p/8000000L/optiboot_flash_atmega328p_UART0_38400_8000000L_B5.hex:
                              avrdude: input file C:\Users\billa\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.1.1/bootloaders/optiboot_flash/bootloaders/atmega328p/8000000L/optiboot_flash_atmega328p_UART0_38400_8000000L_B5.hex contains 32768 bytes
                              avrdude: reading on-chip flash data:
                              
                              Reading | ################################################## | 100% 0.00s
                              
                              avrdude: verifying ...
                              avrdude: 32768 bytes of flash verified
                              avrdude: reading input file "0x0f"
                              avrdude: writing lock (1 bytes):
                              
                              Writing | ################################################## | 100% 0.05s
                              
                              avrdude: 1 bytes of lock written
                              avrdude: verifying lock memory against 0x0f:
                              avrdude: load data lock data from input file 0x0f:
                              avrdude: input file 0x0f contains 1 bytes
                              avrdude: reading on-chip lock data:
                              
                              Reading | ################################################## | 100% 0.02s
                              
                              avrdude: verifying ...
                              avrdude: 1 bytes of lock verified
                              
                              avrdude done.  Thank you.
                              
                              
                              1 Reply Last reply
                              0
                              • G Gilles BILLARD

                                skywatch: You remembered to connect the nrf before going to sleep?
                                @skywatch Yes, of course;
                                I'm 67, retired, and after 9 days (part time) on this issue, I give up !
                                I am therefore torn between crushing all that stuff between between a big hammer and my anvil or to discard everything to the trash can.
                                These sensors are useless if consuming 20mA H24-7/7 because they they should normally be used outside (in my greenhouses) powered by a battery 18650 + a solar cell.

                                skywatchS Offline
                                skywatchS Offline
                                skywatch
                                wrote on last edited by skywatch
                                #332

                                @Gilles-BILLARD I understnad your frustration - I have been there myself.

                                I suggest s simple node to test with, something like the door/window sensor with just one switch.

                                Take your promini, remove leds and power regulator (or cut tracks) then burn MiniCore bootloader with 9600 baud, 3.3V, 8MHz INTERNAL, BoD DISABLED.

                                Then add the radio module (you can try another if you have it - what radio modules are you using? - A link or photo might help, there are bad ones and fakes that could be a problem for you). Load your sketch and try again.

                                You can measure the current to the whole set up and then just the radio to see if radio is not sleeping. ....

                                G 2 Replies Last reply
                                0
                                • skywatchS skywatch

                                  @Gilles-BILLARD I understnad your frustration - I have been there myself.

                                  I suggest s simple node to test with, something like the door/window sensor with just one switch.

                                  Take your promini, remove leds and power regulator (or cut tracks) then burn MiniCore bootloader with 9600 baud, 3.3V, 8MHz INTERNAL, BoD DISABLED.

                                  Then add the radio module (you can try another if you have it - what radio modules are you using? - A link or photo might help, there are bad ones and fakes that could be a problem for you). Load your sketch and try again.

                                  You can measure the current to the whole set up and then just the radio to see if radio is not sleeping. ....

                                  G Offline
                                  G Offline
                                  Gilles BILLARD
                                  wrote on last edited by Gilles BILLARD
                                  #333

                                  @skywatch said in 💬 Battery Powered Sensors:

                                  I suggest s simple node to test with, something like the door/window sensor with just one switch.

                                  I'll do that, but for my thermal sensor the test cannot be more simple

                                  ......burn MiniCore bootloader with 9600 baud, 3.3V, 8MHz INTERNAL, BoD DISABLED.

                                  I don't have the choice for the baud rate; Where is it located ?

                                  Then add the radio module (you can try another if you have it

                                  I swaped everything I could. (The radio modules that was connected to the single functionning sensor included)

                                  what radio modules are you using? - A link or photo might help, there are bad ones and fakes that could be a problem for you).

                                  Bought from Aliexpress;

                                  Load your sketch and try again.

                                  I have done the whole process hundreds and hundreds of time

                                  You can measure the current to the whole set up and then just the radio to see if radio is not sleeping. ....

                                  Yes I'll do that...

                                  skywatchS 2 Replies Last reply
                                  0
                                  • G Gilles BILLARD

                                    @skywatch said in 💬 Battery Powered Sensors:

                                    I suggest s simple node to test with, something like the door/window sensor with just one switch.

                                    I'll do that, but for my thermal sensor the test cannot be more simple

                                    ......burn MiniCore bootloader with 9600 baud, 3.3V, 8MHz INTERNAL, BoD DISABLED.

                                    I don't have the choice for the baud rate; Where is it located ?

                                    Then add the radio module (you can try another if you have it

                                    I swaped everything I could. (The radio modules that was connected to the single functionning sensor included)

                                    what radio modules are you using? - A link or photo might help, there are bad ones and fakes that could be a problem for you).

                                    Bought from Aliexpress;

                                    Load your sketch and try again.

                                    I have done the whole process hundreds and hundreds of time

                                    You can measure the current to the whole set up and then just the radio to see if radio is not sleeping. ....

                                    Yes I'll do that...

                                    skywatchS Offline
                                    skywatchS Offline
                                    skywatch
                                    wrote on last edited by
                                    #334

                                    @Gilles-BILLARD It's in the sketch when you start serial interface. As an aside have you checked the baud rate the pro mini or uno you are using as a programmer - maybe it is 115200 and that is optimistic for a 3.3V board. Make sure the programmer is using 19200 just to be safe.

                                    For inof I am using arduino ide 1.8.13 and musensors 2.3.2 with a £2 aliexpress serial prgrammer and have only encountered warnings about sck (which can safely be ignored)....

                                    G 2 Replies Last reply
                                    0
                                    • G Gilles BILLARD

                                      @skywatch said in 💬 Battery Powered Sensors:

                                      I suggest s simple node to test with, something like the door/window sensor with just one switch.

                                      I'll do that, but for my thermal sensor the test cannot be more simple

                                      ......burn MiniCore bootloader with 9600 baud, 3.3V, 8MHz INTERNAL, BoD DISABLED.

                                      I don't have the choice for the baud rate; Where is it located ?

                                      Then add the radio module (you can try another if you have it

                                      I swaped everything I could. (The radio modules that was connected to the single functionning sensor included)

                                      what radio modules are you using? - A link or photo might help, there are bad ones and fakes that could be a problem for you).

                                      Bought from Aliexpress;

                                      Load your sketch and try again.

                                      I have done the whole process hundreds and hundreds of time

                                      You can measure the current to the whole set up and then just the radio to see if radio is not sleeping. ....

                                      Yes I'll do that...

                                      skywatchS Offline
                                      skywatchS Offline
                                      skywatch
                                      wrote on last edited by
                                      #335

                                      @Gilles-BILLARD said in 💬 Battery Powered Sensors:

                                      Bought from Aliexpress;

                                      That is not much help.

                                      G 1 Reply Last reply
                                      0
                                      • skywatchS skywatch

                                        @Gilles-BILLARD It's in the sketch when you start serial interface. As an aside have you checked the baud rate the pro mini or uno you are using as a programmer - maybe it is 115200 and that is optimistic for a 3.3V board. Make sure the programmer is using 19200 just to be safe.

                                        For inof I am using arduino ide 1.8.13 and musensors 2.3.2 with a £2 aliexpress serial prgrammer and have only encountered warnings about sck (which can safely be ignored)....

                                        G Offline
                                        G Offline
                                        Gilles BILLARD
                                        wrote on last edited by Gilles BILLARD
                                        #336

                                        @skywatch said in 💬 Battery Powered Sensors:

                                        @Gilles-BILLARD It's in the sketch when you start serial interface. As an aside have you checked the baud rate the pro mini or uno you are using as a programmer - maybe it is 115200 and that is optimistic for a 3.3V board. Make sure the programmer is using 19200 just to be safe.

                                        For inof I am using arduino ide 1.8.13 and musensors 2.3.2 with a £2 aliexpress serial prgrammer and have only encountered warnings about sck (which can safely be ignored)....

                                        Ha, OKay; I've aslo supposed a pb from that, so I removed the sérial monitor and baud rate config.
                                        And after the bootlaoder burning, the log is OKay.. the MEGA328P ID is also the good one and always the same for all 328

                                        1 Reply Last reply
                                        0
                                        • skywatchS skywatch

                                          @Gilles-BILLARD said in 💬 Battery Powered Sensors:

                                          Bought from Aliexpress;

                                          That is not much help.

                                          G Offline
                                          G Offline
                                          Gilles BILLARD
                                          wrote on last edited by
                                          #337

                                          @skywatch
                                          1 board
                                          Radio : https://www.amazon.fr/NRF24L01-antenne-module-emetteur-recepteur-sans/dp/B01FLVTY3G/ref=sr_1_21?dchild=1&hvadid=80470576921758&hvbmt=be&hvdev=c&hvqmt=e&keywords=nrf2401&qid=1618066959&sr=8-21

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


                                          3

                                          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
                                          • OpenHardware.io
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular