sorry man i've been pretty busy, but i looked over your code just in a text editor, i can definitely help you out and get it rocking

i will work on establishing a properly checksummed and flow controlled serial datastream, as well as managing your static data a bit better so this thing is tuneable without recompiling.

what you have to realize is when you do something like

if(variable_a > 200) whatever; // select gear one
if(varable_b > 200) whatever; // select gear two

the behavior of the compiler is unpredictable in that circumstance, it may place 200 in static data addr. and re-use it for both compares, or it may not. being able to edit those in-place in the bin is nearly impossible now. however if you:

const int const_a = 200;
const int const_b = 200;
if(variable_a > const_a) whatever;
if(variable_b > const_b) whatever;

unless you have a very heavy optimizing compiler, you're in the clear; you just locate that static data and you're good to go.

but a better solution would be (which in a simple compiler and arch, usually ensures the data ends up being in a sequential block):

struct calib {
const int const_a = 200;
const int const_b = 200;
};

if you're planning any major changes to it in the short term, let me know, i dont want to go fixing this one if you already have another version in the works.