how do I do write it?
Create list and them pick 1 value from it , and random data bytes
for example it will create me something like this:
184217D0 : 123456CCDF991C
0CFE6CEE : FFAACCDDEEBBC1
i'm a big fan of developing code by simulating it off target on a laptop
so you need a sub-function to generate a specific canbus msg with random data values or specific values for specific cases. the code for both generating the msgs and deciding which msg to generate is part of the simulation code, not the target code
i usually read commands from a file for controlling external inputs and driving the simulation (e.g. invoking loop() 1 or more times). different cmd files can be used to simulate different scenarios
yes
this is what I want to do:
build a device with Arduino and MCP2515 that will send me random data (which I mange to do) from a known PID list ,
it is connected to a computer that read the canbus data and analyze it .
very easy setup .
but as I wrote - he is sending me just the last 3 chars of the PID
"1EE"
and not the all PID I have wrote
"0x18FEC1EE"