New compile error for Pro Mini 3.3v 168

  • Re: [Compile error for Pro Mini 5](5v 168)

    I read about compile errors earlier, and that the 168 chip wasn't supported. But I believe some fixes has been done, so now it should be supported right?

    So I am trying to create a node with this pro mini 3.3v. I connected a RFM69hw to it. Then I copied the button sketch, just for testing to see if I could make this work. I deleted the Bouncer and SPI module to make sure that this wasn't the reason for the compile error.

    The compile error is:

    Arduino: 1.8.1 (Windows 7), Board: "Arduino Pro or Pro Mini, ATmega168 (3.3V, 8 MHz)"
    Build options changed, rebuilding all
    In file included from c:\users\r.od.akker\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2\avr\include\avr\io.h:99:0,
                     from c:\users\r.od.akker\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2\avr\include\avr\pgmspace.h:90,
                     from C:\Users\r.od.akker\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.21\cores\arduino/Arduino.h:28,
                     from sketch\MySensorsButton.ino.cpp:1:
    C:\Roland\Arduino\libraries\MySensors/hal/architecture/AVR/MyHwAVR.cpp: In function 'bool hwUniqueID(uint8_t (*)[16])':
    C:\Roland\Arduino\libraries\MySensors/hal/architecture/AVR/MyHwAVR.cpp:246:26: error: 'SIGRD' was not declared in this scope
      *((uint8_t*)uniqueID) = boot_signature_byte_get(0x00);
    C:\Roland\Arduino\libraries\MySensors/hal/architecture/AVR/MyHwAVR.cpp:247:30: error: 'SIGRD' was not declared in this scope
      *((uint8_t*)uniqueID + 1) = boot_signature_byte_get(0x02);
    C:\Roland\Arduino\libraries\MySensors/hal/architecture/AVR/MyHwAVR.cpp:248:30: error: 'SIGRD' was not declared in this scope
      *((uint8_t*)uniqueID + 2) = boot_signature_byte_get(0x04);
    C:\Roland\Arduino\libraries\MySensors/hal/architecture/AVR/MyHwAVR.cpp:249:30: error: 'SIGRD' was not declared in this scope
      *((uint8_t*)uniqueID + 3) = boot_signature_byte_get(0x01); //OSCCAL
    exit status 1
    Error compiling for board Arduino Pro or Pro Mini.
    This report would have more information with
    "Show verbose output during compilation"
    option enabled in File -> Preferences.

    And just to be complete, my sketch is:

     * The MySensors Arduino library handles the wireless radio link and protocol
     * between your home built sensors/actuators and HA controller of choice.
     * The sensors forms a self healing radio network with optional repeaters. Each
     * repeater and gateway builds a routing tables in EEPROM which keeps track of the
     * network topology allowing messages to be routed to nodes.
     * Created by Henrik Ekblad <>
     * Copyright (C) 2013-2015 Sensnology AB
     * Full contributor list:
     * Documentation:
     * Support Forum:
     * This program is free software; you can redistribute it and/or
     * modify it under the terms of the GNU General Public License
     * version 2 as published by the Free Software Foundation.
     * Simple binary switch example 
     * Connect button or door/window reed switch between 
     * digitial I/O pin 3 (BUTTON_PIN below) and GND.
    // Enable debug prints to serial monitor
    #define MY_DEBUG 
    // Enable and select radio type attached
    //#define MY_RADIO_NRF24
    #define MY_RADIO_RFM69
    #define MY_IS_RFM69HW
    //#define MY_RFM69_FREQUENCY RFM69_868MHZ
    #include <MySensors.h>
    #define CHILD_ID 3
    #define BUTTON_PIN  3  // Arduino Digital I/O pin for button/reed switch
    int oldValue=-1;
    // Change to V_LIGHT if you use S_LIGHT in presentation below
    MyMessage msg(CHILD_ID,V_TRIPPED);
    void setup()  
      // Setup the button
      // Activate internal pull-up
    void presentation() {
      // Register binary input sensor to gw (they will be created as child devices)
      // You can use S_DOOR, S_MOTION or S_LIGHT here depending on your usage. 
      // If S_LIGHT is used, remember to update variable type you send in. See "msg" above.
      present(CHILD_ID, S_DOOR);  
    //  Check if digital input has changed and send in new value
    void loop() 
      int value = digitalRead(BUTTON_PIN);
      if (value != oldValue) {
         // Send in the new value
         send(msg.set(value==HIGH ? 1 : 0));
         oldValue = value;

    Does this mean the atmel 168 isn't supported enough yet? MySensors lib is up to date at 2.2.0.

  • Mod

    @rolandow I can compile your sketch for Atmega168 (except that it becomes too big for the atmega168's flash) when using MySensors 2.1.1, but get the same error as you when using MySensors 2.2.0.

    Due to the small flash size, very few MySensors fit on an atmega168 so most people find it more worthwhile to use the atmega328 than spend time on trying to get things working on atmega168.

  • Mod

    Reference to github issue (so we don't split our efforts)

  • Yes, I've ordered the upgraded chip for my old Dieciemila board but I thought I'd document what it took to compile a sketch with a DHT22 sensor.

  • @mfalkvidd Thank you for trying to compile my code :-). I am wondering how I can use the 2.2.1 version of MySensors though, because on github I can't find it anywhere. I cannot find a tag with 2.2.1 and develop and master have different versions as well.

  • Mod

    @rolandow sorry, my bad. I meant 2.1.1.

  • @mfalkvidd Ok, no problem. So if I understand correctly, a bug appeared in the newer MySensors lib, so this would probably be fixed in the future, because of the issue that was opened on github?

    I will switch to the atmega 328 for my current. When I was even more a rookie than I am now, I didn't pay any attention to the chips that was on the pro mini. So now I have a bunch of those atmega168's. Maybe I could still use them as a door sensor. I imagine this shouldn't take too much extra memory.

  • Mod

    @rolandow it will be fixed if someone decides to spend their time to fix it. MySensors is a community project: all work is done by people like you and me.

  • I am aware of the open source concept, I wasn't trying to push something or somebody ;-). It just surprised me a bit that this issue comes up in a newer version of the library.

    I was wondering; how can I easily switch to a lower version of MySensors? Are you using the Arduino IDE to do so? I read some github issues about maintaining libraries with different versions, and it seems to be rather complicated or unsupported even. So what is the recommended way if I want to use version 2.1.1.

    Maybe I can already test my communication while I'm waiting for my logic level shifters to arrive.

  • Mod

    @rolandow You can up/downgrade using the Library Manager in the Arduino IDE if you like. It is OK to mix nodes with different 2.x versions in the same network, so you can use 2.1.1 for your atmega168 nodes and 2.2.0 on your other nodes.
    Personally I use git to switch between different MySensors versions. I clone MySensors into the library folder and just switch branches.

Log in to reply

Suggested Topics

  • 11
  • 6
  • 8
  • 2
  • 17
  • 2
  • 11
  • 3