unusable



  • hi! it's really broken. my sketch (do nothing, only test):

    #include <MySensor.h>
    
    MyTransportNRF24 transport();
    MyHwATMega328 hw;
    MySensor gw(transport, hw);
    
    void setup() {}
    void loop() {}
    

    and compiling:

    mkdir -p build-pro5v328
    /usr/bin/avr-g++ -x c++ -include Arduino.h -MMD -c -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=105  -D__PROG_TYPES_COMPAT__ -I/usr/share/arduino/hardware/arduino//cores/arduino -I/usr/share/arduino/hardware/arduino//variants/standard    -I/usr/share/arduino/libraries/SPI    -I/home/andrej/Projects/Sensors/Energy/libraries/DallasTemperature   -I/home/andrej/Projects/Sensors/Energy/libraries/MySensors -I/home/andrej/Projects/Sensors/Energy/libraries/MySensors/utility   -I/home/andrej/Projects/Sensors/Energy/libraries/OneWire -Wall -ffunction-sections -fdata-sections -Os -fno-exceptions  Energy.ino -o build-pro5v328/Energy.ino.o
    In file included from Energy.ino:2:0:
    /home/andrej/Projects/Sensors/Energy/libraries/MySensors/MySensor.h:158:70: error: expected type-specifier before ‘MyHwDriver’
      MySensor(MyTransport &radio =*new MyTransportNRF24(), MyHw &hw=*new MyHwDriver()
                                                                          ^
    Energy.ino:5:1: error: ‘MyHwATMega328’ does not name a type
     MyHwATMega328 hw;
     ^
    Energy.ino:6:24: error: ‘hw’ was not declared in this scope
     MySensor gw(transport, hw);
                            ^
    

  • Admin

    #include <MySensor.h>
    #include <SPI.h>
    
    MyTransportNRF24 transport;
    MyHwATMega328 hw;
    MySensor gw(transport, hw);
    
    void setup() {}
    void loop() {}
    

    This works... note the changes I made.



  • @b0rmann it's a compilation error, you must add the following lines before #include <MySensor.h> :

    #include <MyTransportNRF24.h>
    #include <MyHwATMega328.h>



  • This post is deleted!


  • This post is deleted!

Log in to reply
 

Suggested Topics

1
Online

11.4k
Users

11.1k
Topics

112.7k
Posts