Skip to content

I can't compile the example #10

@truba-ua

Description

@truba-ua

Hello!
I'm trying to run a demo example in Arduino IDE 2.2.1,
renamed CLRC663-Demo.ino.cpp to CLRC663-Demo.ino
When compiling, an error is thrown -
c:\Users..\Documents\Arduino\libraries\CLRC663-Library-main\CLRC663.cpp: In member function 'void CLRC663::begin()':
c:\Users..\Documents\Arduino\libraries\CLRC663-Library-main\CLRC663.cpp:87:36: error: no matching function for call to 'TwoWire::begin(byte&, byte&)'
_wire->begin(pinSDA, pinSCL);
^
In file included from c:\Users..\Documents\Arduino\libraries\CLRC663-Library-main\CLRC663.h:5:0,
from c:\Users..\Documents\Arduino\libraries\CLRC663-Library-main\CLRC663.cpp:18:
C:\Users..\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src/Wire.h:53:10: note: candidate: void TwoWire::begin( )
void begin();
^~~~~
C:\Users..\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src/Wire.h:53:10: note: candidate expects 0 arguments, 2 provided
C:\Users..\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src/Wire.h:54:10: note: candidate: void TwoWire::begin( uint8_t)
void begin(uint8_t);
^~~~~
C:\Users..\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src/Wire.h:54:10: note: candidate expects 1 argument, 2 provided
C:\Users..\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src/Wire.h:55:10: note: candidate: void TwoWire::begin( int)
void begin(int);
^~~~~
C:\Users..\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src/Wire.h:55:10: note: candidate expects 1 argument, 2 provided
c:\Users..\Documents\Arduino\libraries\CLRC663-Library-main\CLRC663.cpp: In member function 'void CLRC663::begin(int, int)':
c:\Users..\Documents\Arduino\libraries\CLRC663-Library-main\CLRC663.cpp:94:12: error: 'class TwoWire' has no member named 'setPins'
_wire->setPins(sda, scl);
^~~~~~~

What did I do wrong?

I apologize for the length of text and the possible obviousness of the answer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions