Receiving CAN messages and printing to a serial LCD

Hello,

What I am trying to do is read a CAN message from the ECU of a car (Motec M400 ECU) and I would like to print parts of this CAN message to a serial LCD screen.

The first step is to make the CAN shield run on 1000kbps because this is the speed the ECU runs with. I will use the CAN_BUS_SHIELD code to try and receive data on the BUS.

The hard part is going to be printing this message to a serial LCD. I looked at the CANBUS_SHIELD_OBD_RECIPLE code but the problem is that this code uses OBD PIDs to obtain information, my ECU does not have OBD.

I know the exact address of the CAN message (I can set it in the ECU software). What I need is some code that can read the message at this address and then print it to a serial LCD.

Can anyone help me do this?

Thank you

hey~ I want to know that can you read data from ECU or send data to ECU now?

if so, you can set Mask and Filt to receive certain address data. :astonished:

Right now I am using your “receive” example and I am getting some data but I am not too sure what I am looking at. I thought the CAN message would be much longer? Also, I am only getting one or two lines, when I restart the arduino I get different values every time. Here is what I am getting:

CAN_BUS GET DATA!
data len = 8
0	0	0	0	1	3	20	91	

CAN_BUS GET DATA!
data len = 8
0	0	0	0	0	0	5	59	

CAN_BUS GET DATA!
data len = 8
0	68	121	110	111	100	111	99	
CAN_BUS GET DATA!
data len = 8
19	68	19	64	2	16	0	0	

CAN_BUS GET DATA!
data len = 8
0	0	0	0	0	0	5	60	

CAN_BUS GET DATA!
data len = 8
19	64	19	60	2	16	0	0	

CAN_BUS GET DATA!
data len = 8
19	72	19	68	2	16	0	0	

CAN_BUS GET DATA!
data len = 8
5	34	1	137	0	0	0	0	
CAN_BUS GET DATA!
data len = 8
0	0	0	0	0	0	0	0	

CAN_BUS GET DATA!
data len = 8
0	0	0	0	0	0	5	60	
CAN_BUS GET DATA!
data len = 8
3	179	0	0	0	0	1	244	

How do I tell which adress this is coming from, which part of this is the data?

Did you make any further progress? I have the same problem where I get 3-4 lines and then nothing until I reset the arduino or restart the serial monitor.