CANFestivino
CANFestivino copied to clipboard
Include directories
When I tried to compile, it can not find include dependences. Now i have downloaded libraries from other repos on github, and i'm getting this error: " error: 'EFlg_RxEP' is not a member of 'MCP_CAN' else if (ef && MCP_CAN::EFlg_RxEP)"
Do you have my fork of the CAN bus library (https://github.com/jgeisler0303/CAN_BUS_Shield) in your libraries folder?
Thanks for reply, now it compiles without a problem. And my last question: Can you give me "blank" example without DHT22, etc?
I don't have one laying around. But why don't you just delete all DHT related stuff (and I presume the Mcp23s17 related stuff too) from the example? You could, e.g., replace all calls to the DHT sensor reading with reading analog signals from the Arduino pins.
Yeah, i tried it, but I had to delete almost all code, there isn't specified Chip Select (CS) pin too. `#include "canfestival.h" #include "ObjDict.h" // These all need to be included because canfestival needs them #include <avr/io.h> #include "Arduino.h" #include <SPI.h> #include "mcp_can.h" #include "Timer.h" #include "digitalWriteFast.h" #include "BlinkPattern.h"
CO<3, 4> co;
const uint16_t CANopenDevErr_DHTErrorCode= 0xFF00; const uint16_t CANopenMonErr_UnderVoltage= 0x8300;
void setup() { co.CO_Init(); }
void loop() { co.CO_Cycle(); }`
Yes, that's the problem with a blank example: without some sensors there is not much left to show. But maybe I would at least leave the callback functions and only delete the specific DHT code in them (even though the name becomes misleading then). I guess, otherwise the code doesn't compile anymore, or does it?
What do you mean with "there isn't specified Chip Select (CS)"? The one for the CAN controller or the one for the Mcp23s17?
"Beware that my example expects the CS of the MCP2515 on a different pin than the Seeed CAN bus shield." I mean to which arduino pin I have to connect CS.
I'm asking for example with one simple sensor ( ADC ), or even static int to be transmitted through CANopen, because Your code with Mcp23s17 and DHT22 is so complicated.
Thank you for quick answers.
The CS pin for the MCP2515 CAN bus chip is set in CO_can_Arduino.cpp line 8. Currently it is set to pin 7.
I really don't have time to provide more simple example, as that would also entail to write some documentation about how to use the objdictedit to generate the problem specific CANopen interface files.
Ok, i will try on my own. And how about INT pin?
As far as I can see, interrupt mode is currently not supported. Incoming messages are polled.