Compile errors UI7 and Mysensors v1.5



  • Using a Veralite with UI7.
    Newest arduino MySensors library v1.5.
    Using the newest UI7 Luup files.

    I am trying to compile the very simple switch example given with the MySensor arduino examples on ProMini but is not working.

    In file included from BinarySwitchSensor.ino:30:
    C:\Users\Wayne\Documents\Arduino\libraries\MySensors/MySensor.h:158: error: expected type-specifier before 'MyHwDriver'
    C:\Users\Wayne\Documents\Arduino\libraries\MySensors/MySensor.h:158: error: default argument for parameter of type 'MyHw&' has type 'int'
    C:\Users\Wayne\Documents\Arduino\libraries\MySensors/MySensor.h:158: error: expected ',' before 'MyHwDriver'

    I can't seem to understand whats happening. Am I missing a reference? Can someone help? Thanks


  • Admin

    Are you using the latest version of the Arduino IDE ? 1.6.x



  • No Hek that was a good call I think it was 1.0.6 so I loaded 1.6.5 and now I get this error:

    Arduino: 1.6.5 (Windows 8.1), Board: "Arduino Mini, ATmega328"

    In file included from C:\Users\Wayne\Documents\Arduino\libraries\MySensors\MyGateway.cpp:12:0:
    C:\Users\Wayne\Documents\Arduino\libraries\MySensors\MyGateway.h:39:28: error: 'DEFAULT_CE_PIN' was not declared in this scope
    MyGateway(uint8_t _cepin=DEFAULT_CE_PIN, uint8_t _cspin=DEFAULT_CS_PIN, uint8_t _inclusion_time = 1, uint8_t _inclusion_pin = 3, uint8_t _rx=6, uint8_t _tx=5, uint8_t _er=4);
    ^
    C:\Users\Wayne\Documents\Arduino\libraries\MySensors\MyGateway.h:39:59: error: 'DEFAULT_CS_PIN' was not declared in this scope
    MyGateway(uint8_t _cepin=DEFAULT_CE_PIN, uint8_t _cspin=DEFAULT_CS_PIN, uint8_t _inclusion_time = 1, uint8_t _inclusion_pin = 3, uint8_t _rx=6, uint8_t _tx=5, uint8_t _er=4);
    ^
    C:\Users\Wayne\Documents\Arduino\libraries\MySensors\MyGateway.cpp: In constructor 'MyGateway::MyGateway(uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t)':
    C:\Users\Wayne\Documents\Arduino\libraries\MySensors\MyGateway.cpp:27:167: error: no matching function for call to 'MySensor::MySensor(uint8_t&, uint8_t&)'
    MyGateway::MyGateway(uint8_t _cepin, uint8_t _cspin, uint8_t _inclusion_time, uint8_t _inclusion_pin, uint8_t _rx, uint8_t _tx, uint8_t _er) : MySensor(_cepin, _cspin) {
    ^
    C:\Users\Wayne\Documents\Arduino\libraries\MySensors\MyGateway.cpp:27:167: note: candidates are:
    In file included from C:\Users\Wayne\Documents\Arduino\libraries\MySensors\MyGateway.h:15:0,
    from C:\Users\Wayne\Documents\Arduino\libraries\MySensors\MyGateway.cpp:12:
    C:\Users\Wayne\Documents\Arduino\libraries\MySensors\MySensor.h:158:2: note: MySensor::MySensor(MyTransport&, MyHw&)
    MySensor(MyTransport &radio =new MyTransportNRF24(), MyHw &hw=new MyHwDriver()
    ^
    C:\Users\Wayne\Documents\Arduino\libraries\MySensors\MySensor.h:158:2: note: no known conversion for argument 1 from 'uint8_t {aka unsigned char}' to 'MyTransport&'
    C:\Users\Wayne\Documents\Arduino\libraries\MySensors\MySensor.h:149:7: note: MySensor::MySensor(const MySensor&)
    class MySensor
    ^
    C:\Users\Wayne\Documents\Arduino\libraries\MySensors\MySensor.h:149:7: note: candidate expects 1 argument, 2 provided
    C:\Users\Wayne\Documents\Arduino\libraries\MySensors\MyGateway.cpp: In member function 'void MyGateway::begin(rf24_pa_dbm_e, uint8_t, rf24_datarate_e, void (
    )(char
    ))':
    C:\Users\Wayne\Documents\Arduino\libraries\MySensors\MyGateway.cpp:40:20: error: 'setupRepeaterMode' was not declared in this scope
    setupRepeaterMode();
    ^
    C:\Users\Wayne\Documents\Arduino\libraries\MySensors\MyGateway.cpp:76:39: error: 'setupRadio' was not declared in this scope
    setupRadio(paLevel, channel, dataRate);
    ^
    C:\Users\Wayne\Documents\Arduino\libraries\MySensors\MyGateway.cpp:77:36: error: 'BASE_RADIO_ID' was not declared in this scope
    RF24::openReadingPipe(WRITE_PIPE, BASE_RADIO_ID);
    ^
    C:\Users\Wayne\Documents\Arduino\libraries\MySensors\MyGateway.cpp:79:23: error: cannot call member function 'void RF24::startListening()' without object
    RF24::startListening();
    ^
    Error compiling.

    In file included from C:\Users\Wayne\Documents\Arduino\libraries\MySensors\MyGateway.cpp:12:0:
    C:\Users\Wayne\Documents\Arduino\libraries\MySensors\MyGateway.h:39:28: error: 'DEFAULT_CE_PIN' was not declared in this scope
    MyGateway(uint8_t _cepin=DEFAULT_CE_PIN, uint8_t _cspin=DEFAULT_CS_PIN, uint8_t _inclusion_time = 1, uint8_t _inclusion_pin = 3, uint8_t _rx=6, uint8_t _tx=5, uint8_t _er=4);
    ^
    C:\Users\Wayne\Documents\Arduino\libraries\MySensors\MyGateway.h:39:59: error: 'DEFAULT_CS_PIN' was not declared in this scope
    MyGateway(uint8_t _cepin=DEFAULT_CE_PIN, uint8_t _cspin=DEFAULT_CS_PIN, uint8_t _inclusion_time = 1, uint8_t _inclusion_pin = 3, uint8_t _rx=6, uint8_t _tx=5, uint8_t _er=4);
    ^
    C:\Users\Wayne\Documents\Arduino\libraries\MySensors\MyGateway.cpp: In constructor 'MyGateway::MyGateway(uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t)':
    C:\Users\Wayne\Documents\Arduino\libraries\MySensors\MyGateway.cpp:27:167: error: no matching function for call to 'MySensor::MySensor(uint8_t&, uint8_t&)'
    MyGateway::MyGateway(uint8_t _cepin, uint8_t _cspin, uint8_t _inclusion_time, uint8_t _inclusion_pin, uint8_t _rx, uint8_t _tx, uint8_t _er) : MySensor(_cepin, _cspin) {
    ^
    C:\Users\Wayne\Documents\Arduino\libraries\MySensors\MyGateway.cpp:27:167: note: candidates are:
    In file included from C:\Users\Wayne\Documents\Arduino\libraries\MySensors\MyGateway.h:15:0,
    from C:\Users\Wayne\Documents\Arduino\libraries\MySensors\MyGateway.cpp:12:
    C:\Users\Wayne\Documents\Arduino\libraries\MySensors\MySensor.h:158:2: note: MySensor::MySensor(MyTransport&, MyHw&)
    MySensor(MyTransport &radio =new MyTransportNRF24(), MyHw &hw=new MyHwDriver()
    ^
    C:\Users\Wayne\Documents\Arduino\libraries\MySensors\MySensor.h:158:2: note: no known conversion for argument 1 from 'uint8_t {aka unsigned char}' to 'MyTransport&'
    C:\Users\Wayne\Documents\Arduino\libraries\MySensors\MySensor.h:149:7: note: MySensor::MySensor(const MySensor&)
    class MySensor
    ^
    C:\Users\Wayne\Documents\Arduino\libraries\MySensors\MySensor.h:149:7: note: candidate expects 1 argument, 2 provided
    C:\Users\Wayne\Documents\Arduino\libraries\MySensors\MyGateway.cpp: In member function 'void MyGateway::begin(rf24_pa_dbm_e, uint8_t, rf24_datarate_e, void (
    )(char
    ))':
    C:\Users\Wayne\Documents\Arduino\libraries\MySensors\MyGateway.cpp:40:20: error: 'setupRepeaterMode' was not declared in this scope
    setupRepeaterMode();
    ^
    C:\Users\Wayne\Documents\Arduino\libraries\MySensors\MyGateway.cpp:76:39: error: 'setupRadio' was not declared in this scope
    setupRadio(paLevel, channel, dataRate);
    ^
    C:\Users\Wayne\Documents\Arduino\libraries\MySensors\MyGateway.cpp:77:36: error: 'BASE_RADIO_ID' was not declared in this scope
    RF24::openReadingPipe(WRITE_PIPE, BASE_RADIO_ID);
    ^
    C:\Users\Wayne\Documents\Arduino\libraries\MySensors\MyGateway.cpp:79:23: error: cannot call member function 'void RF24::startListening()' without object
    RF24::startListening();
    ^
    Error compiling.

    This report would have more information with
    "Show verbose output during compilation"
    enabled in File > Preferences.


  • Admin



  • @hek Thanks this worked 🙂


Log in to reply
 

Suggested Topics

  • 1
  • 5
  • 3
  • 3
  • 10
  • 6

10
Online

11.4k
Users

11.1k
Topics

112.7k
Posts