Sorry, I forgot to remove that pasted part from the code when I posted, I was just testing to make sure the directory linking wasn't causing the problem. Nope, I'm just trying to use the libraries via standard #include and then call the functions in main to return values for sensors....It doesn't seem to compile though...
avr-gcc -c -mmcu=atmega168 -I. -gdwarf-2 -DF_CPU=18432000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=AssistantRobot13F.lst -std=gnu99 -MD -MP -MF .dep/AssistantRobot13F.o.d AssistantRobot13F.c -o AssistantRobot13F.o
In file included from ./Sensors/Distance/../_sensor_common.h:39,
./Sensors/Distance/../../libdefs.h:89:25: avr/common.h: No such file or directory
AssistantRobot13F.c: In function `SonarInitialize':
AssistantRobot13F.c:382: error: structure has no member named `distance'
AssistantRobot13F.c: In function `SonarRanging':
AssistantRobot13F.c:491: error: structure has no member named `distance'
AssistantRobot13F.c:492: error: structure has no member named `distance'
AssistantRobot13F.c:492: warning: unused variable `cm'
make.exe: *** [AssistantRobot13F.o] Error 1
in the variable structure sensor.distance.cm and in the functions distanceInit(sensor) and distanceRead(sensor). I don't really know why its not recognizing 'distance'.
As for using another microcontroller like AxonII, I'm unfortunately restricted by a class assignment (and the school's lack of money...
But thanks a lot for offering to share your code, I may just but one for hobby projects in the near future.
In the mean time, any help with this situation would be greatly appreciated!!