Skip to content
New issue

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

Can not read message .. (extendet) #143

Closed
aortner opened this issue May 22, 2023 · 2 comments
Closed

Can not read message .. (extendet) #143

aortner opened this issue May 22, 2023 · 2 comments
Assignees
Labels
Seeed_Arduino_CAN Label for Seeed_Arduino_CAN UAY Unassigned yet

Comments

@aortner
Copy link

aortner commented May 22, 2023

char hole[8] = {0x40, 0x00, 0x21, 0x01, 0x00, 0x00, 0x00, 0x00 };
CAN.MCP_CAN::sendMsgBuf(0x06000001, 1, 8, hole);

i send this to my keya motor..

i should get:
Motor current query: 40 00 21 01 00 00 00 00
Return ID: 0x0580000 + controller ID (hexadecimal)
Data 60 00 21 01 DATA 00 00 00
DATA =((unsigned char*)(&send_float))

but i do not receive anything...

with this:
unsigned char len = 0;
unsigned char buf[8];

if (CAN_MSGAVAIL == CAN.checkReceive()) {         // check if data coming
    CAN.readMsgBuf(&len, buf);    // read data,  len: data length, buf: data buf

    unsigned long canId = CAN.getCanId();

    SERIAL_PORT_MONITOR.println("-----------------------------");
    SERIAL_PORT_MONITOR.print("Get data from ID: 0x");
    SERIAL_PORT_MONITOR.println(canId, HEX);

    for (int i = 0; i < len; i++) { // print the data
        SERIAL_PORT_MONITOR.print(buf[i], HEX);
        SERIAL_PORT_MONITOR.print("\t");
    }
    SERIAL_PORT_MONITOR.println();
@MatthewJeffson MatthewJeffson added UAY Unassigned yet Seeed_Arduino_CAN Label for Seeed_Arduino_CAN labels Oct 9, 2024
@Lesords Lesords self-assigned this Oct 14, 2024
@Lesords
Copy link
Contributor

Lesords commented Oct 16, 2024

Hello,

I'm very sorry to have kept you waiting so long.

Do you still have this problem now?

@Lesords
Copy link
Contributor

Lesords commented Nov 4, 2024

Hello,

I'm going to close this issue, feel free to re-open it if you have any other questions.

[Autocommentary]

@Lesords Lesords closed this as completed Nov 4, 2024
@github-project-automation github-project-automation bot moved this from Todo to Done in Issues and PR Assemble Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Seeed_Arduino_CAN Label for Seeed_Arduino_CAN UAY Unassigned yet
Projects
Status: Done
Development

No branches or pull requests

3 participants