What I am trying to develop is arduino based controller which monitors LIN based communication (one wire 9600 bits per second) http://en.wikipedia.org/wiki/Local_Interconnect_Network#LIN_protocol
The idea is to monitor lin bus(car steering wheel buttons) via arduino serial rx line and based on the received data perform switch actions.
Most difficult part for me is to find out how to filter out the important bytes from the lin frame which includes at least five bytes.
- wait for the uart brake - serial starts
- wait for the sync byte - uart 0x55 always
- look the ID byte - known 8 bit byte
- read the data byte(S) - based on that information start switch case
If anyone has good ideas or similar code - you are welcome to help:)