Can bus read to send

hiii .. how do i read hex to sent hex ? libray mcp_can.h

read ID 1DC DLC 4 DATA 02 03 DA 3F TO SEND ID 1CF DLC 8 DATA 98 85 00 00 00 02 00 39

THANK YOU HELP

When you send it with can, part of the protocol versify that it was transmitted correctly and received,, if not it tries again for x number of times then errors out if not successful. No you cannot read what you send you need another receiving device. You need to indicate the base the numbers are in. 1D should be 0x1D, the 0X indicates it is a hex number. It will read whatever is sent, it does not know hex from beans, that is your software's problem. 0x04 is 4 decimal, ox1D is 29 in decimal. Check this link:Hex to Decimal Converter

yes, we understand but don't know how to write? We have tried writing send to success but read to send is not successful :smiling_face_with_tear:

Please show your efforts

Incorrect comment leads to the bug - the "data" variable is not an array in your code.

You set the message size to 8 bytes, but send a single char variables data and data1.

Did you intended to send a Data and Data1 instead?

read

id 1DC id 1DC
dlc 4 dlc 4
data 02 03 D8 04 data 02 03 D6 24

to send

id 1CF id 1 CF
dlc 8 dlc 8
data 1C 05 00 00 00 03 00 16 data 1C 05 00 00 00 03 00 07

How do I write? can you help me? delay (100)

Do you know that variable names in C/C++ are case-sensitive?
Your data and Data are two different variables.
The array is referenced by Data, but you trying sending the data instead:

@hendrauser
Did you copy this code from somewhere and don't understand a single line of it?
Your questions convince me of this....

I wrote to you what your problem is. You mixed up the variables.

And what is your problem? Did you fix the code?

Yes, I want to repair ID RPM 1K to ID ASST100%...can you write for me?

you want to repair? sorry, I don't understand you

Yes, sorry, I need to change the read ID to the send ID