First... why would you not simply use the defines you show in your header...
I have a pretty strong notion that's why the defines are there...Code:// instead of... x = getsensaddr(5); //use... x = SENSOR_5;
If you need those addresses in variables create an array...
Code:// add to header const int Sensor[6] = {SENSOR_1, SENSOR_2, SENSOR_3, SENSOR_4, SENSOR_5, SENSOR_6}; // use as... int i = 4; x = Sensor[i];