by Rerouter » Thu Feb 26, 2015 11:26 am
For the most basic, figure out what value is what gear,
you can then either use a case statement, or a bunch of if statements, so when it sees the gear has changed, serial print the new gear in text that you can understand,
so for writing the code, you would read in that string from your can interpreter, bitshift it across as needed, then & with 0xF, to get just that value
You use switch/case to create a list of what number corresponds to what gear, and have a variable that remembers the last gear so it doesn't update on every can message, but only when it changes,
you then use the serial print to print thr output of the switch/case and away you go,
if you want to use a display, i can walk you through using a generic 16x2 character display easily (takes up 6 pins i believe)