Canbus emulator

Hi everyone, I am a newby in the world of Arduino - I am hoping to use it to construct a simple canbus emulator to send some data to a Electronic Power Steering (EPS) from a Toyota Yaris I am installing in a non-canbus classic car. The EPS needs to see the engine rpm before it provides full assistance, otherwise it operates in "fail-safe" mode, just basic assistance to get you home. In fact the one I have will not wake up at all, other people in the carmod community have found this problem and have proposed solutions.
I am thinking of using a DFRduino Uno R3 +CAN BUS Shield for Arduino, is this sensible or are there better solutions?
The software someone else has written (for a Toyota Prius) that might be suitable-

#include <SPI.h>
#include <mcp2515.h>
//struct can_frame canMsg;
struct can_frame canMsg1;
struct can_frame canMsg2;
unsigned long lastMillis = 0;
 
MCP2515 mcp2515(17);

void setup() {
 // Serial.begin(9600);
  mcp2515.reset();
  mcp2515.setBitrate(CAN_500KBPS);
  mcp2515.setNormalMode();
  canMsg1.can_id  = 0x2C4; //engine speed
  canMsg1.can_dlc = 8;
  canMsg1.data[0] = 0x06;
  canMsg1.data[1] = 0x8A;
  canMsg1.data[2] = 0x00;
  canMsg1.data[3] = 0x19;
  canMsg1.data[4] = 0x00;
  canMsg1.data[5] = 0x00;
  canMsg1.data[6] = 0x92;
  canMsg1.data[7] = 0x09;
 }
void loop() {
  delay(20);
  mcp2515.sendMessage(&canMsg1
}
```````````````````````````````````````````````````````````````````````````````````````
Any advise will be gratefully received!

the ESP32 has a onboard Canbus Two-Wire Automotive Interface (TWAI)
have a look at the ESP32-TWAI-CAN library
it only requires an external CAN transceiver to interface to a Canbus network, e.g. CJMCU-230

Welcome!
How are you testing this?

From your description, it appears that it should be working properly. By definition, a CAN message must be acknowledged by at least one other node on the bus. If no other unit is present or responding, the transmission will fail.

When working with CAN, I like using Cory Fowler’s MCP2515 CAN library because it includes both transmit and receive examples. I recommend getting both modules communicating reliably first. Once you confirm that the basic send/receive examples work, remove the example transmitter and substitute your own code.

You can use almost any Arduino to communicate over CAN, provided you have the proper CAN controller and transceiver module. Each node on the bus can use a different processor, they only need to agree on bit rate and message format.

Thank you for your advice, I will look for the library files that you recommend.

John you may have trouble decoding what its looking for. I ran into the same issue so I replaced the factory can controller board in the pump with a 50A brushless ESC controller. Works off PWM then I just monitor the vehicle speed on the can bus and control the pwm for the power steering pump speed

There are some older cars with electric power steering that don’t connect to canbus - it would be easier to source one of those . ( in UK Vauxhall Corsa - takes a pulse signal Proportional to speed to vary assistance )

you need to think of safety aspects of this Installation and what can go wrong if you code crashes out .