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
Daniel OliveiraD

Daniel Oliveira

@Daniel Oliveira
About
Posts
48
Topics
4
Shares
0
Groups
0
Followers
1
Following
9

Posts

Recent Best Controversial

  • MH-Z19 CO2 sensor
    Daniel OliveiraD Daniel Oliveira

    Hello,

    I finally got this sensor to work but instead I use this lib: https://github.com/nara256/mhz19_uart
    Another very useful source of information is this: https://revspace.nl/MHZ19#command_0x62_.28device_name_.2F_id.29

    Take note that is the MH-Z19B the methods isWarming() and getStatus() do not work.

    Can you please share the values that you are getting? I'm getting around 1500ppm and it is alarming by these website standards:
    https://www.engineeringtoolbox.com/co2-comfort-level-d_1024.html
    https://www.kane.co.uk/knowledge-centre/what-are-safe-levels-of-co-and-co2-in-rooms

    I didn't have the opportunity yet to get the sensor outdoors.

    Thank you in advance

    Hardware

  • MH-Z19 CO2 sensor
    Daniel OliveiraD Daniel Oliveira

    @mfalkvidd said in MH-Z19 CO2 sensor:

    @daniel-oliveira isn't this sufficient? If not, what is missing?

     *  MH-Z19 CO2 sensor
     *  It communicates with your board over serial at 9600 speed.
    ---
    SoftwareSerial mySerial(10, 11);                  // RX, TX . You can choose other pins if you prefer.
    

    Missed that one, got confused due to the multiple possible ways to connect this sensor. (UART, PWM, etc)

    So TX, RX, GND and Vin sould be enough?

    Hardware

  • MH-Z19 CO2 sensor
    Daniel OliveiraD Daniel Oliveira

    Hi!

    Thank you for sharing, can you please point me out how do I wire this thing up? :)

    Hardware

  • 💬 PiDome
    Daniel OliveiraD Daniel Oliveira

    Is this project dead? Can't reach homepage

    Announcements

  • Prevent Relay from triggering on power loss or broker reboot
    Daniel OliveiraD Daniel Oliveira

    Hi,

    I'm not an expert and honestly I didn't read all the comments, but to avoid the relay to change status on reboots would not be a simpler solution to add a "flip-flop" mechanism that will "save" the last sate for some minutes?

    Best regards

    Troubleshooting

  • 💬 MDMSNode "Lighting"
    Daniel OliveiraD Daniel Oliveira

    Hi,

    Can you please give a reference for the MDMS series devices? I'm not aware of it neither was able to find any reference in the forum. But I'm curious.

    OpenHardware.io nrf24l01 rfm69 arduino mysensors light switch light acdc

  • [WIP] Best practices to power your nodes
    Daniel OliveiraD Daniel Oliveira

    Hello all,

    I think that good quality power source is a very important aspect to have a stable MySensors network or any other projects.
    In this forum there are a lot of people facing problems that are solved by improving how they power their projects, but despite that I think that all related information is scattered in the forum and not always easy to find or to relate.

    So, why not bring this amazing community together and point here some good practices on how to power our nodes? :)
    I would like to start this by addressing first two topics, "approved" power adaptors and bypass capacitors.

    Power adaptors:

    • Cellphone chargers
    • HLK PM01 (toAddLink)
    • ToBeCompleted

    Bypass Capacitors:
    (What is a bypass capacitor: http://www.learningaboutelectronics.com/Articles/What-is-a-bypass-capacitor.html)

    • NRF24L01: To discuss in this thread
    • ESP8266: 470uF as close as possible to Vin and GND pins

    Please add your opinions and knowledge about this topic, my goal is to keep this post up to date with shared information.

    For example, what are the values that you recommend for the NRF24L01 and why? I saw people mentioning 4.5uF, 10uF and 47uF. Personally I'm using the latter and I have no issues.

    Thank you all.

    Hardware

  • WS2811 RGB strip lights up in groups of three
    Daniel OliveiraD Daniel Oliveira

    Well... I'm sorry for you, but at least now everyone that reads this thread will be aware.

    Cheers

    Hardware

  • 💬 AC-DC double solid state relay module
    Daniel OliveiraD Daniel Oliveira

    Can someone please point me out the software used to design the PCB?
    If I got some time I would like to try out the improvements that I've mentioned before.
    It makes more or less 10 years the last time that I've did some PCB design with Eagle, nostalgia.... :)

    OpenHardware.io hlk-pm01 solid state relay light switch light acdc

  • WS2811 RGB strip lights up in groups of three
    Daniel OliveiraD Daniel Oliveira

    Just found this in the product description : "LED Type: 1 WS2811 IC control 3 LED Chip,"

    Hardware

  • WS2811 RGB strip lights up in groups of three
    Daniel OliveiraD Daniel Oliveira

    Hi,

    Looking at the product picture indeed there is only one WS2811 IC per each 3 LEDs. So... I'm afraid the behaviour that you describe is that LED strip can do...

    I have around here some WS2801 LED strips and there's one IC per LED.

    Hardware

  • 💬 AC-DC double solid state relay module
    Daniel OliveiraD Daniel Oliveira

    I would like to suggest to move the termal fuse and the varistor.

    I would move the temp fuse to where the SB fuse is, the latter to where the varistor is. And finally the varistor to where the "My Sensors Board" inscription is.

    This would remove the mains trace from the middle of the PCB away from the ds18b20 and the connector for the switches.

    It would also allow to move the NRF24 and the switched connector closer to the HLK and thus further from the mains connector.

    Best regards

    OpenHardware.io hlk-pm01 solid state relay light switch light acdc

  • [solved] MySensorWrapper - Wrapping sensor libraries for MySensors 2.0.x - need help
    Daniel OliveiraD Daniel Oliveira

    Hi!

    I accomplish to do what I wanted thanks to the help of you all, so I'm sharing the results :)

    I ended up with this very simple MySensorGeneric.ino that is able to manage a DHT and a BH1750

    /**
    * Name:		MySensorGeneric.ino
    * Created:	20-Aug-16 22:47:51
    * Author:	Daniel
    *
    *******************************
    *
    * REVISION HISTORY
    * Version 0.1 - Development
    *
    */
    
    #include "MySensorConfig.h"
    #include <MySensors.h>
    
    #include "MySensorWrapperDHT.h"
    #include "MySensorWrapperBH1750.h"
    
    #define CHILD_ID_LIGHT 2
    #define CHILD_ID_TEMP  1
    #define CHILD_ID_HUM   0
    #define HUMIDITY_SENSOR_DIGITAL_PIN 3
    
    MySensorWrapperBH1750 SensorBH1750(CHILD_ID_LIGHT);
    MySensorWrapperDHT    SensorDHT(CHILD_ID_TEMP, CHILD_ID_HUM, HUMIDITY_SENSOR_DIGITAL_PIN);
    
    void setup()
    {
      SensorBH1750.Setup();
      SensorDHT.Setup();
    }
    
    void presentation() {
      sendSketchInfo("My Generic Sensor", "0.11");
      SensorBH1750.Present();
      SensorDHT.Present();
    }
    
    void loop()
    {
      SensorBH1750.UpdateSensorValue();
      SensorDHT.UpdateSensorValue();
      wait(SLEEP_TIME);
    }
    

    I've created a class to manage the BH1750:
    MySensorWrapperBH1750.h

    // MySensorWrapperBH1750.h
    
    #ifndef _MYSENSORWRAPPERBH1750_h
    #define _MYSENSORWRAPPERBH1750_h
    
    //Need to add to project Version.h and MyEepromAdresses.h
    #include "MySensorsCore.h"
    
    #include <BH1750.h>
    
    class MySensorWrapperBH1750
    {
    public:
      MySensorWrapperBH1750(uint8_t sensor_id);
      ~MySensorWrapperBH1750();
      void Setup();
      void Present();
      void UpdateSensorValue();  
    
    private:
      uint8_t _sensor_id;
      uint16_t _lastValue;
      BH1750 _sensor;
      MyMessage _msg;
    };
    
    #endif
    
    
    

    MySensorWrapperBH1750.cpp

    /**
    * Name:		MySensorWrapperBH1750
    * Created:	20-Aug-16 22:47:51
    * Author:	Daniel
    * Version 0.1 - Draft
    *
    *******************************
    *
    * MySensors Wrapper for BH1750 sensor.
    * Wiring (I2C):
    * Sensor -> Arduino
    *  GND   -> GND
    *  ADD   -> NC
    *  SDA   -> A4
    *  SCL   -> A5
    *  VCC   -> +5V
    *
    */
    
    
    #include "MySensorWrapperBH1750.h"
    
    MySensorWrapperBH1750::MySensorWrapperBH1750(uint8_t sensor_id)
    {
      _sensor_id = sensor_id;
      MyMessage _msg(_sensor_id, V_LEVEL);
    }
    
    MySensorWrapperBH1750::~MySensorWrapperBH1750()
    {
    }
    
    void MySensorWrapperBH1750::Setup()
    {
      // TODO: Set initialization mode
      // Default mode:
      // Start measurement at 1lx resolution. Measurement time is approx 120ms.
      // #define BH1750_CONTINUOUS_HIGH_RES_MODE  0x10
      // Start measurement at 1lx resolution. Measurement time is approx 120ms.
      // Device is automatically set to Power Down after measurement.
      // #define BH1750_ONE_TIME_HIGH_RES_MODE  0x20
    
      _sensor.begin();
    }
    
    void MySensorWrapperBH1750::Present()
    {
      present(_sensor_id, S_LIGHT_LEVEL);
    }
    
    void MySensorWrapperBH1750::UpdateSensorValue()
    {
      // Fetch light in Lux from BH1750 sensor
      uint16_t newValue = _sensor.readLightLevel();// Get Lux value
      if (isnan(newValue)) {
        #ifdef MY_DEBUG
            Serial.println("Failed reading Light from BH1750");
        #endif
      }
      else if (newValue != _lastValue) {
        #ifdef MY_DEBUG
          Serial.print("Lux: ");
          Serial.println(newValue);
        #endif
        send(_msg.set(newValue));
        _lastValue = newValue;
      }
    }
    

    And for the DHT I've created the following class:
    MySensorWrapperDHT.h

    // MySensorWrapperDHT.h
    
    #ifndef _MYSENSORWRAPPERDHT_h
    #define _MYSENSORWRAPPERDHT_h
    
    //Need to add to project Version.h and MyEepromAdresses.h
    #include "MySensorsCore.h"
    
    #include "DHT.h"
    
    class MySensorWrapperDHT
    {
    public:
      MySensorWrapperDHT(uint8_t sensor_temp_id, uint8_t sensor_humd_id, uint8_t sensor_pin = 3);
      ~MySensorWrapperDHT();
      void Setup();
      void Present();
      void UpdateSensorValue();
    
    private:
      uint8_t _sensorTempId;
      uint8_t _sensorHumdId;
      uint8_t _sensorPin;
      DHT _sensor;
      MyMessage _msgTemp;
      MyMessage _msgHumd;
      float _lastTempValue;
      float _lastHumdValue;
    };
    
    #endif
    
    

    MySensorWrapperDHT.cpp

    /**
    * Name:		MySensorWrapperDHT
    * Created:	20-Aug-16 22:47:51
    * Author:	Daniel
    * Version 0.1 - Draft
    *
    *******************************
    *
    * MySensors Wrapper for DHT sensor.
    * Wiring ():
    * Sensor -> Arduino
    *  GND   -> GND
    *  OUT   -> D3
    *  VCC   -> +5V
    *
    * NOTE: If using a board with 3.3V logic like an Arduino Due connect pin 1
    * to 3.3V instead of 5V!
    * Connect pin 2 of the sensor to whatever your DHTPIN is
    * Connect a 10K resistor from pin 2 (data) to pin 1 (power) of the sensor
    * https://github.com/adafruit/DHT-sensor-library/blob/master/examples/DHTtester/DHTtester.ino
    */
    
    #include "MySensorWrapperDHT.h"
    
    MySensorWrapperDHT::MySensorWrapperDHT(uint8_t sensor_temp_id, uint8_t sensor_humd_id, uint8_t sensor_pin)
    {
      _sensorTempId = sensor_temp_id;
      _sensorHumdId = sensor_humd_id;
      _sensorPin = sensor_pin;
      MyMessage _msgTemp(_sensorTempId, V_TEMP);
      MyMessage _msgHumd(_sensorHumdId, V_HUM);
    }
    
    MySensorWrapperDHT::~MySensorWrapperDHT()
    {
    }
    
    void MySensorWrapperDHT::Setup()
    {
      _sensor.setup(_sensorPin, DHT::DHT22);
    }
    
    void MySensorWrapperDHT::Present()
    {
      present(_sensorTempId, S_TEMP);
      present(_sensorHumdId, S_HUM);
    }
    
    void MySensorWrapperDHT::UpdateSensorValue()
    {
      // TODO: really needed?
      wait(_sensor.getMinimumSamplingPeriod());
      
      // Reading temperature or humidity takes about 250 milliseconds!
      // Sensor readings may also be up to 2 seconds 'old' (its a very slow sensor)
      float currentTempValue = _sensor.getTemperature();
      float currentHumdValue = _sensor.getHumidity();
    
      // Check if any reads failed and exit early (to try again).
      if (isnan(currentTempValue) || isnan(currentHumdValue) ){
        Serial.println("Failed to read from DHT sensor!");
      }
      else {
        // Update temperature from DHT sensor
        if (currentTempValue != _lastTempValue) {
          _lastTempValue = currentTempValue;
          send(_msgTemp.set(currentTempValue, true));
          #ifdef MY_DEBUG
            Serial.print("Temp: ");
            Serial.println(currentTempValue);
          #endif
        }
        // Update humidity from DHT sensor
        if (currentHumdValue != _lastHumdValue) {
          _lastHumdValue = currentHumdValue;
          send(_msgHumd.set(currentHumdValue, 1));
          #ifdef MY_DEBUG
            Serial.print("Hum: ");
            Serial.println(currentHumdValue);
          #endif
        }
      }
    }
    

    And to my surprise the footprint after compiling is even smaller, 18,374 bytes (59%) of program storage space and 913 bytes (44%) of dynamic memory with a single .ino versus 17,748 bytes (58%) of program storage space and 857 bytes (42%) of dynamic memory the above project in VisualMicro. Both results with MY_DEBUG defined.

    Next step is to create classes to manage switches, relays and LEDs.

    Once again thank you all for the help and fell free to share your opinions about the way I'm trying to do things.

    Best regards

    Development programming idea visualmicro development

  • [solved] MySensorWrapper - Wrapping sensor libraries for MySensors 2.0.x - need help
    Daniel OliveiraD Daniel Oliveira

    @hek said:

    You can only include MySensors.h once from your sketch. It drags in .cpp files.

    So if you need MySensors things in your class, just include the stuff you need. I.e. MyMessage.h.

    Hi @hek

    As usual you are a live saviour, in this case MySensor projects saviour :)

    Because I want to access present() and send() functions I had to include the MySensorsCore.h and then add to the project (source files) the Version.h and the MyEepromAdresses.h to be able to compile.

    I'll do some tests and report back.

    Cheers

    Development programming idea visualmicro development

  • [solved] MySensorWrapper - Wrapping sensor libraries for MySensors 2.0.x - need help
    Daniel OliveiraD Daniel Oliveira

    @ericvdb said:

    @Daniel-Oliveira That seems to me an issue with the build process.
    I think you better point this out on the VisualMicro Forum

    Hi,

    Thank you for the tip, and I bring news.

    Indeed I open a thread and after trying the suggested (that in fact was already suggested here) I found that I?m able to do what I want with another library, for example Bounce2.

    If I add #include "Bounce.h" to both my .ino file and to my MySensorWrapperBH1750.h it works flawlessly.
    In the other hand if I include have the MySensorWrapperBH1750.h like this:

    #define MY_BAUD_RATE 9600
    #define MY_RADIO_NRF24
    #define MY_DEBUG
    
    #include <MySensors.h>
    // and then my class
    

    And I include ONLY the MySensorWrapperBH1750.h in my .ino file I get the same error.
    What I understand from here is that even including MySensors library only once some how it is included twice when compiling.
    Does MySonsors lack somehow a "multiple inclusion protection"?

    Regards,

    Development programming idea visualmicro development

  • [solved] MySensorWrapper - Wrapping sensor libraries for MySensors 2.0.x - need help
    Daniel OliveiraD Daniel Oliveira

    @Daniel-Oliveira said:

    Hi @tekka , @ericvdb and @Stuart-Middleton ,

    As VisualMicro users can you kindly take a look as this thread?

    Thank you in advance

    Bump :)

    Development programming idea visualmicro development

  • [solved] MySensorWrapper - Wrapping sensor libraries for MySensors 2.0.x - need help
    Daniel OliveiraD Daniel Oliveira

    Hi @tekka , @ericvdb and @Stuart-Middleton ,

    As VisualMicro users can you kindly take a look as this thread?

    Thank you in advance

    Development programming idea visualmicro development

  • Free MySensors 2.0 workshop, Friday 9 September in Amersfoort (The Netherlands)
    Daniel OliveiraD Daniel Oliveira

    Making a video of that workshop available as an introduction material for the MySensors website would be a 2nd best thing :)

    General Discussion

  • Node is not using repeater to talk to gateway
    Daniel OliveiraD Daniel Oliveira

    Hi @karl261,

    It's a long shot but can you double check your power sources? I had some weird issues like those in the past because of bad quality power sources.

    I recommend adding a 47uF electrolytic capacitor as close as possible to the NRF24 GND and VCC pins, as a 470uF between the GND and the Vin pins of the arduino.

    And keep the external power source on even when connecting the USB cable to read the debug messages.

    Hope you solve this issue soon

    Troubleshooting

  • [solved] MySensorWrapper - Wrapping sensor libraries for MySensors 2.0.x - need help
    Daniel OliveiraD Daniel Oliveira

    @Nca78 said:

    Hello,

    I think your problem is you are including MySensors library before the configuration is visible to the controller. The error you have means it has started to compile the MySensors.h before it checked the MySensorConfig.h and saw the #define MY_RADIO_NRF24

    You should try to remove the #ifndef _MYSENSORCONFIG_h from the MySensorConfig.h file and put it in each file where you need to include MySensors.h, and inside this condition include both MySensorConfig.h and MySensors.h :

    #ifndef _MYSENSORCONFIG_h
     #include "MySensorConfig.h"
     #include <MySensors.h>
    #endif
    

    and your "MySensorConfig.h becomes :

    // MySensorConfig.h
    
    #define _MYSENSORCONFIG_h
    
    #define MY_BAUD_RATE 9600
    #define MY_RADIO_NRF24
    
    #define SLEEP_TIME 5000
    

    Hi and thank you for the help.

    Things apparently improved but still not there.

    Should I put the include of the MySensorConfig.h and MySensors.h as you mentioned also in the .ino file?
    And when a I have a class adding it to the header file is enough or should I also add it to the .cpp?

    Anyway I have problems in the linking stage apparently, do you have a clue?

    Compiling 'MySensorGeneric' for 'Arduino Nano w/ ATmega328'
    Build folder: file:///C:/Users/Daniel/AppData/Local/Temp/VMicroBuilds/MySensorGeneric/nano_atmega328
    Summary: Header=1 Prototypes=4 Imports=1
    Additional Defines: MY_DEBUG;
    Architecture Tools: C:\Users\Daniel\AppData\Local\arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.3-arduino2/bin/
    Sketchbook: file:\\\C:\Users\Daniel\Documents\Arduino
    Sketch Include Paths
    Include Path 'C:\Users\Daniel\Documents\Arduino\projects\MySensorGeneric'
    Core Include Paths
    Include Path 'C:\Users\Daniel\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.13\cores\arduino'
    Include Path 'C:\Users\Daniel\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.13\variants\eightanaloginputs'
    "C:\Users\Daniel\AppData\Local\arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.3-arduino2\bin\avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=106010 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -I"C:\Users\Daniel\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.13\cores\arduino" -I"C:\Users\Daniel\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.13\variants\eightanaloginputs" "C:\Users\Daniel\AppData\Local\Temp\VMicroBuilds\MySensorGeneric\nano_atmega328\MySensorGeneric.cpp" -o "nul"
    "C:\Users\Daniel\AppData\Local\arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.3-arduino2\bin\avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=106010 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -I"C:\Users\Daniel\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.13\cores\arduino" -I"C:\Users\Daniel\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.13\variants\eightanaloginputs" -I"C:\Users\Daniel\Documents\Arduino\libraries\MySensors" "C:\Users\Daniel\AppData\Local\Temp\VMicroBuilds\MySensorGeneric\nano_atmega328\MySensorGeneric.cpp" -o "nul"
    "C:\Users\Daniel\AppData\Local\arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.3-arduino2\bin\avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=106010 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -I"C:\Users\Daniel\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.13\cores\arduino" -I"C:\Users\Daniel\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.13\variants\eightanaloginputs" -I"C:\Users\Daniel\Documents\Arduino\libraries\MySensors" -I"C:\Users\Daniel\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.13\libraries\SPI\src" "C:\Users\Daniel\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.13\libraries\SPI\src\SPI.cpp" -o "nul"
    "C:\Users\Daniel\AppData\Local\arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.3-arduino2\bin\avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=106010 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -I"C:\Users\Daniel\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.13\cores\arduino" -I"C:\Users\Daniel\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.13\variants\eightanaloginputs" -I"C:\Users\Daniel\Documents\Arduino\libraries\MySensors" -I"C:\Users\Daniel\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.13\libraries\SPI\src" "C:\Users\Daniel\AppData\Local\Temp\VMicroBuilds\MySensorGeneric\nano_atmega328\MySensorGeneric.cpp" -o "nul"
    "C:\Users\Daniel\AppData\Local\arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.3-arduino2\bin\avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=106010 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -I"C:\Users\Daniel\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.13\cores\arduino" -I"C:\Users\Daniel\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.13\variants\eightanaloginputs" -I"C:\Users\Daniel\Documents\Arduino\libraries\MySensors" -I"C:\Users\Daniel\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.13\libraries\SPI\src" -I"C:\Users\Daniel\Documents\Arduino\libraries\BH1750" -I"C:\Users\Daniel\Documents\Arduino\libraries\BH1750\utility" "C:\Users\Daniel\Documents\Arduino\libraries\BH1750\BH1750.cpp" -o "nul"
    "C:\Users\Daniel\AppData\Local\arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.3-arduino2\bin\avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=106010 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -I"C:\Users\Daniel\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.13\cores\arduino" -I"C:\Users\Daniel\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.13\variants\eightanaloginputs" -I"C:\Users\Daniel\Documents\Arduino\libraries\MySensors" -I"C:\Users\Daniel\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.13\libraries\SPI\src" -I"C:\Users\Daniel\Documents\Arduino\libraries\BH1750" -I"C:\Users\Daniel\Documents\Arduino\libraries\BH1750\utility" -I"C:\Users\Daniel\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.13\libraries\Wire\src" "C:\Users\Daniel\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.13\libraries\Wire\src\Wire.cpp" -o "nul"
    "C:\Users\Daniel\AppData\Local\arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.3-arduino2\bin\avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=106010 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -I"C:\Users\Daniel\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.13\cores\arduino" -I"C:\Users\Daniel\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.13\variants\eightanaloginputs" -I"C:\Users\Daniel\Documents\Arduino\libraries\MySensors" -I"C:\Users\Daniel\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.13\libraries\SPI\src" -I"C:\Users\Daniel\Documents\Arduino\libraries\BH1750" -I"C:\Users\Daniel\Documents\Arduino\libraries\BH1750\utility" -I"C:\Users\Daniel\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.13\libraries\Wire\src" "C:\Users\Daniel\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.13\libraries\Wire\src\utility\twi.c" -o "nul"
    "C:\Users\Daniel\AppData\Local\arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.3-arduino2\bin\avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=106010 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -I"C:\Users\Daniel\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.13\cores\arduino" -I"C:\Users\Daniel\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.13\variants\eightanaloginputs" -I"C:\Users\Daniel\Documents\Arduino\libraries\MySensors" -I"C:\Users\Daniel\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.13\libraries\SPI\src" -I"C:\Users\Daniel\Documents\Arduino\libraries\BH1750" -I"C:\Users\Daniel\Documents\Arduino\libraries\BH1750\utility" -I"C:\Users\Daniel\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.13\libraries\Wire\src" "C:\Users\Daniel\Documents\Arduino\libraries\BH1750\BH1750.cpp" -o "nul"
    "C:\Users\Daniel\AppData\Local\arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.3-arduino2\bin\avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=106010 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -I"C:\Users\Daniel\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.13\cores\arduino" -I"C:\Users\Daniel\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.13\variants\eightanaloginputs" -I"C:\Users\Daniel\Documents\Arduino\libraries\MySensors" -I"C:\Users\Daniel\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.13\libraries\SPI\src" -I"C:\Users\Daniel\Documents\Arduino\libraries\BH1750" -I"C:\Users\Daniel\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.13\libraries\Wire\src" "C:\Users\Daniel\AppData\Local\Temp\VMicroBuilds\MySensorGeneric\nano_atmega328\MySensorGeneric.cpp" -o "nul"
     
    Building core ...
     
    Building libraries ...
    Using library BH1750 version 0.0.0 in folder C:\Users\Daniel\Documents\Arduino\libraries\BH1750
    Using previously compiled file: C:\Users\Daniel\AppData\Local\Temp\VMicroBuilds\MySensorGeneric\nano_atmega328\BH1750\BH1750.cpp.o
    Using library MySensors version 2.0.1-beta in folder C:\Users\Daniel\Documents\Arduino\libraries\MySensors
    Using library SPI version 1.0 in folder C:\Users\Daniel\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.13\libraries\SPI
    Using library Wire version 1.0 in folder C:\Users\Daniel\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.13\libraries\Wire
     
    Building project code ...
    Using previously compiled file: C:\Users\Daniel\AppData\Local\Temp\VMicroBuilds\MySensorGeneric\nano_atmega328\MySensorGeneric.cpp.o
    Using previously compiled file: C:\Users\Daniel\AppData\Local\Temp\VMicroBuilds\MySensorGeneric\nano_atmega328\MySensorWrapperBH1750.cpp.o
     
    Linking it all together ...
    "C:\Users\Daniel\AppData\Local\arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.3-arduino2/bin/avr-gcc" -w -Os -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o "C:\Users\Daniel\AppData\Local\Temp\VMicroBuilds\MySensorGeneric\nano_atmega328/MySensorGeneric.ino.elf" "C:\Users\Daniel\AppData\Local\Temp\VMicroBuilds\MySensorGeneric\nano_atmega328\MySensorGeneric.cpp.o" "C:\Users\Daniel\AppData\Local\Temp\VMicroBuilds\MySensorGeneric\nano_atmega328\Wire\Wire.cpp.o" "C:\Users\Daniel\AppData\Local\Temp\VMicroBuilds\MySensorGeneric\nano_atmega328\Wire\utility\twi.c.o" "C:\Users\Daniel\AppData\Local\Temp\VMicroBuilds\MySensorGeneric\nano_atmega328\SPI\SPI.cpp.o" "C:\Users\Daniel\AppData\Local\Temp\VMicroBuilds\MySensorGeneric\nano_atmega328\BH1750\BH1750.cpp.o" "C:\Users\Daniel\AppData\Local\Temp\VMicroBuilds\MySensorGeneric\nano_atmega328\MySensorWrapperBH1750.cpp.o" "C:\Users\Daniel\AppData\Local\Temp\VMicroBuilds\MySensorGeneric\nano_atmega328/core.a" "-LC:\Users\Daniel\AppData\Local\Temp\VMicroBuilds\MySensorGeneric\nano_atmega328" -lm
     
    MySensorWrapperBH1750.cpp.o (symbol from plugin)*: In function wakeUp1()
    (.text+0x0)*: multiple definition of wakeUp1()
    MySensorGeneric.cpp.o (symbol from plugin)*: (.text+0x0): first defined here
     
    MySensorWrapperBH1750.cpp.o (symbol from plugin)*: In function wakeUp1()
    (.text+0x0)*: multiple definition of _wakeUp1Interrupt
    MySensorGeneric.cpp.o (symbol from plugin)*: (.text+0x0): first defined here
     
    // and similiar erros another 100 times
     
    collect2.exe*: error: ld returned 1 exit status
    
    Error compiling for board Arduino Nano w/ ATmega328
    

    Thank you all for the help

    Development programming idea visualmicro development
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular