Hello.
I have a simple task to achieve, I guess, but I'm stuck. All I need to do is to read the Speed of the vehicle using data from the obd2 k-line pin, and then to send a command to blink the brake lights when a certain decrease in speed is detected (e.g. more than 2km/h/s). I can not initialize the k-line and I am not able to read anything on the serial monitor on arduino

. The vehicle is an 2004 BMW E60, uses ISO_14230_fast but I guess this is not an issue.
So, all I need Is some help from someone to extract from the code only the part for init sequence for ISO_14230_fast and sone way to read the speed on the serial monitor.