src/CanMod.cpp: In member function 'void CanMod::setup()':
src/CanMod.cpp:9:18: error: 'begin' was not declared in this scope
begin(_canSpeed);
^
src/CanMod.cpp:10:17: error: no matching function for call to 'MCP_CAN::MCP_CAN()'
MCP_CAN(_csPin);
I'm wanting to create an instance of CanMod, that internally creates an instance of MCP_CAN to tap in to its features. How can I do that?
I'm sorry if this question hasn't been presented too straight-forward, but I'm new to the subject. Please refrain from a 'read the error' type of reply, without lending at least the tip of a spoon towards resolving the problem, as I've spent time studying this; but don't yet understand fully what I can or can't do.
PaulS:
Is there some scope in which you think you have defined a begin() method in the CanMod class? I do not see one.
It appears that the MCP_CAN class' constructor does not take an argument. Why are you supplying one?
If you remove my attempt at a class, the MCP_CAN class instance would usually be created like this, and passes the SPI CS pin:
MCP_CAN CAN(CS_PIN)
//later on the module's speed is set like this
CAN.begin(CAN_500KBPS)
It is these two bits I'm wanting to call from the CanMod class I created.