We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have got UNO R3 ( original one ) and seeed studio can shield v2.
This is my code:
#include "Config.h" #include "Components/Logger.h" #include "Components/Can.h" #include <SPI.h> namespace ii::blackbox::components { void Can::SetUp() { // m_canSend.setMode(CAN_NORMAL_MODE); // m_canSend.setMode(CAN_NORMAL_MODE); while (m_canSend.begin(CAN_500KBPS) != CAN_OK && m_canReceive.begin(CAN_500KBPS) != CAN_OK) { #ifdef SERIAL_DEBUG SERIAL_PORT_MONITOR.println("CAN init fail, retry..."); #endif delay(100); } #ifdef SERIAL_DEBUG SERIAL_PORT_MONITOR.println("CAN init OK."); #endif } unsigned char len = 0; unsigned char buf[8]; void Can::Loop() { // --------------------- if (CAN_MSGAVAIL == m_canReceive.checkReceive()) { // read data, len: data length, buf: data buf SERIAL_PORT_MONITOR.println("checkReceive"); m_canReceive.readMsgBuf(&len, buf); // print the data SERIAL_PORT_MONITOR.print("ID: "); SERIAL_PORT_MONITOR.print(m_canReceive.getCanId()); SERIAL_PORT_MONITOR.print(" DLC: "); SERIAL_PORT_MONITOR.print(len); for (int i = 0; i < len; i++) { // SERIAL_PORT_MONITOR.print(buf[i]); // SERIAL_PORT_MONITOR.print(" "); } SERIAL_PORT_MONITOR.println(); } SERIAL_PORT_MONITOR.println("---LOOP END---"); } } // namespace ii::blackbox::components
and here is the response:
checkReceive ID: 536870911 DLC: 255 ---LOOP END--- checkReceive ID: 536870911 DLC: 255 ---LOOP END--- checkReceive ID: 536870911 DLC: 255 ---LOOP END--- checkReceive ID: 536870911 DLC: 255 ---LOOP END--- checkReceive ID: 536870911 DLC: 255 ---LOOP END--- checkReceive ID: 536870911 DLC: 255 ---LOOP END--- checkReceive ID: 536870911 DLC: 255 ---LOOP END--- checkReceive ID: 536870911 DLC: 255 ---LOOP END--- checkReceive ID: 536870911 DLC: 255 ---LOOP END--- checkReceive ID: 536870911 DLC: 255 ---LOOP END--- checkReceive ID: 536870911 DLC: 255 ---LOOP END--- checkReceive ID: 536870911 DLC: 255 ---LOOP END--- checkReceive ID: 536870911 DLC: 255
I tried D9 - D2 / D9 - D10
but its still same result.
Im plugging my shield on my r3 directly.
The text was updated successfully, but these errors were encountered:
Hello,
I'm very sorry to have kept you waiting so long.
Do you still have this problem now?
Sorry, something went wrong.
I'm going to close this issue, feel free to re-open it if you have any other questions.
[Autocommentary]
Lesords
No branches or pull requests
I have got UNO R3 ( original one ) and seeed studio can shield v2.
This is my code:
and here is the response:
I tried D9 - D2 / D9 - D10
but its still same result.
Im plugging my shield on my r3 directly.
The text was updated successfully, but these errors were encountered: