I have been scouring the forums and google and have not found a tutorial specifically about how to create and access a lookup table. I am only trying to take an interger value that is returned through a CAN BUS shield for Vehicle Speed and then reference a numerical value in a lookup table. I want to be able to refence the numerical value according to the vehicle speed. For example:
VSS Numerical Value
25 10
26 12
27 17
28 30
29 32
30 40
etc...
The Numerical Value has no relation to the Vehicle Speed value so I cannot use an equation.
Basically it will read the VSS value and assign it to "VSS":
Canbus.ecu_req(VEHICLE_SPEED,VSS);
then I want it to get the Numerical Value that relates to that speed value.
Thanks