Can't find pololu/orangutan.h

The place to discuss the Pololu 3pi robot and share your code.

Can't find pololu/orangutan.h

Postby louisstraub on Fri Mar 05, 2010 11:05 am

Hello everyone, this is my first day with the 3PI. It was a bumpy ride but I managed to install the hardware and software for the 3PI. I also was able to run the sample program to make the LED blink. My problem is that I want to try other sample programs but they #include pololu/orangutan.h I've tried everything but I can't seem to get that header from any of the sources listed in the documentation. I tried using OrangutanLCD.h but I get ../orangutanLCD.h:35: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'OrangutanLCD'. I'm not quite sure what the error means so I can't take any action. If some one can possibly direct me to or attach the #include pololu/orangutan.h header I would greatly appreciate the help as I would like to continue learning about the 3PI. Thanks in advance to all who respond...........
louisstraub
 
Posts: 7
Joined: Fri Mar 05, 2010 10:49 am

Re: Can't find pololu/orangutan.h

Postby paul on Fri Mar 05, 2010 12:11 pm

Hello,
It sounds like you have downloaded but not actually installed the Pololu AVR Library. Please confirm that you have followed the instructions here.

-Paul
User avatar
paul
Site Admin
 
Posts: 912
Joined: Sun Nov 30, 2003 12:06 am
Location: Las Vegas, NV

Re: Can't find pololu/orangutan.h

Postby louisstraub on Fri Mar 05, 2010 1:31 pm

I have a directory WINAVR-20100110/AVR/INCLUDE/POLOLU which has the same files as the documentation shows, but there still is no pololu/orangutan.h. I'm not super technical, so please excuse what may seem to be simjple questions. If this is not the correct directory, I'm not sure where to go from here. But I did follow the instructions. Could you try to send me the header. It might be a temporary fix until I figure out where I might have made a mistake. Thanks for responding............
louisstraub
 
Posts: 7
Joined: Fri Mar 05, 2010 10:49 am

Re: Can't find pololu/orangutan.h

Postby paul on Fri Mar 05, 2010 3:16 pm

When you say you have the "same files", does that include orangutan.h, which is listed in that screenshot? If not, there is something wrong with your installation. If so, please post the output from the compilation that failed for you so we can look at the actual error message.

-Paul
]]>
User avatar
paul
Site Admin
 
Posts: 912
Joined: Sun Nov 30, 2003 12:06 am
Location: Las Vegas, NV

Re: Can't find pololu/orangutan.h

Postby louisstraub on Sat Mar 06, 2010 6:21 am

I would like to show you what I got when I INSTASLLed the files. This is what I got when I ran INSTALL as Administrator from a DOS Window. According to the output, the installation was good. So in theory, the files exist. I'll recompile and send you the output. Thanks.....

The Pololu AVR Library object files (.a) will be installed in c:/winavr-20100110
/bin/../lib/gcc/avr/4.3.3/../../../../avr/lib/
The header files (.h) will be installed in c:/winavr-20100110/bin/../lib/gcc/avr
/4.3.3/../../../../avr/lib//../include/pololu
(For Windows Vista: make sure to right-click and select "Run as administrator")
Press any key to continue . . .
install -d c:/winavr-20100110/bin/../lib/gcc/avr/4.3.3/../../../../avr/lib/
install -d c:/winavr-20100110/bin/../lib/gcc/avr/4.3.3/../../../../avr/lib//../i
nclude/pololu
install libpololu_atmega48.a libpololu_atmega168.a libpololu_atmega328p.a libpol
olu_atmega324p.a libpololu_atmega1284p.a c:/winavr-20100110/bin/../lib/gcc/avr/4
.3.3/../../../../avr/lib/
install -m=r-- pololu/*.h c:/winavr-20100110/bin/../lib/gcc/avr/4.3.3/../../../.
./avr/lib//../include/pololu
for OrangutanObject in OrangutanAnalog OrangutanBuzzer OrangutanDigital Oranguta
nLCD OrangutanLEDs OrangutanSVP OrangutanSPIMaster OrangutanMotors OrangutanPuls
eIn OrangutanPushbuttons OrangutanResources OrangutanSerial OrangutanServos Oran
gutanTime Pololu3pi PololuQTRSensors PololuWheelEncoders; do install -d c:/winav
r-20100110/bin/../lib/gcc/avr/4.3.3/../../../../avr/lib//../include/pololu/$Oran
gutanObject ; install -m=r-- src/$OrangutanObject/*.h c:/winavr-20100110/bin/../
lib/gcc/avr/4.3.3/../../../../avr/lib//../include/pololu/$OrangutanObject ; done

install -d c:/winavr-20100110/bin/../lib/gcc/avr/4.3.3/../../../../avr/lib//../i
nclude/pololu/OrangutanResources/include
install -m=r-- src/OrangutanResources/include/*.h c:/winavr-20100110/bin/../lib/
gcc/avr/4.3.3/../../../../avr/lib//../include/pololu/OrangutanResources/include
install -m=r-- pololu/orangutan c:/winavr-20100110/bin/../lib/gcc/avr/4.3.3/../.
./../../avr/lib//../include/pololu
Installation is complete.
Press any key to continue . . .
louisstraub
 
Posts: 7
Joined: Fri Mar 05, 2010 10:49 am

Re: Can't find pololu/orangutan.h

Postby louisstraub on Sat Mar 06, 2010 6:30 am

This is the build output when I use OrangutanLCD.h for the header. I hope this helps.......

Build started 6.3.2010 at 08:24:48
avr-gcc -mmcu=atmega168 -Wall -gdwarf-2 -Os -std=gnu99 -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT LCD.o -MF dep/LCD.o.d -c ../LCD.c
In file included from ../LCD.c:1:
../OrangutanLCD.h:35: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'OrangutanLCD'
../LCD.c: In function 'main':
../LCD.c:6: warning: implicit declaration of function 'print'
../LCD.c:7: warning: implicit declaration of function 'delay_ms'
../LCD.c:8: warning: implicit declaration of function 'lcd_scroll'
../LCD.c:9: warning: implicit declaration of function 'clear'
../LCD.c:10: warning: implicit declaration of function 'lcd_goto_xy'
make: *** [LCD.o] Error 1
Build failed with 1 errors and 5 warnings...
louisstraub
 
Posts: 7
Joined: Fri Mar 05, 2010 10:49 am

Re: Can't find pololu/orangutan.h

Postby paul on Sat Mar 06, 2010 10:44 am

Saying "in theory, the files exist" is not helpful. Does orangutan.h exist or not? Also, OrangutanLCD.h is not what you are supposed to be including, and I thought you knew that. Please post the error you get when compiling our examples without changing them.

-Paul
User avatar
paul
Site Admin
 
Posts: 912
Joined: Sun Nov 30, 2003 12:06 am
Location: Las Vegas, NV

Re: Can't find pololu/orangutan.h

Postby louisstraub on Sun Mar 07, 2010 6:10 am

I apologize for my wording. I'm not trying to make extra work for you.

I'm trying to use the 6.f. Orangutan LCD Control Functions program from the Pololu AVR C/C++ Library User's Guide.
The sample program calls for #include <pololu/orangutan.h>. I'm using AVR Studio 4. These are the errors I get
when I compile/build the program. I have made no changes to the program.

rm -rf LCD.o LCD.elf dep/* LCD.hex LCD.eep LCD.lss LCD.map
Build succeeded with 0 Warnings...
avr-gcc -mmcu=atmega168 -Wall -gdwarf-2 -Os -std=gnu99 -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT LCD.o -MF dep/LCD.o.d -c ../LCD.c
avr-gcc -mmcu=atmega168 -Wl,-Map=LCD.map LCD.o -o LCD.elf
LCD.o: In function `main':
C:\Users\Louis Straub\Documents\default/../LCD.c:17: undefined reference to `print'
C:\Users\Louis Straub\Documents\default/../LCD.c:18: undefined reference to `delay_ms'
C:\Users\Louis Straub\Documents\default/../LCD.c:19: undefined reference to `lcd_scroll'
C:\Users\Louis Straub\Documents\default/../LCD.c:20: undefined reference to `clear'
C:\Users\Louis Straub\Documents\default/../LCD.c:21: undefined reference to `lcd_goto_xy'
C:\Users\Louis Straub\Documents\default/../LCD.c:22: undefined reference to `print'
C:\Users\Louis Straub\Documents\default/../LCD.c:23: undefined reference to `delay_ms'
C:\Users\Louis Straub\Documents\default/../LCD.c:24: undefined reference to `lcd_scroll'
C:\Users\Louis Straub\Documents\default/../LCD.c:25: undefined reference to `clear'
make: *** [LCD.elf] Error 1
Build failed with 9 errors and 0 warnings...

Yes, I do have orangutan.h in my WINAVR-20100110/avr/include/pololu directory. The contents of the file is

#include <pololu/analog.h>
#include <pololu/buzzer.h>
#include <pololu/time.h>
#include <pololu/motors.h>
#include <pololu/lcd.h>
#include <pololu/leds.h>
#include <pololu/pushbuttons.h>
#include <pololu/qtr.h>
#include <pololu/encoders.h>
#include <pololu/resources.h>
#include <pololu/digital.h>
#include <pololu/servos.h>
#include <pololu/pulsein.h>
#include <pololu/OrangutanSerial/OrangutanSerial.h>
#include <pololu/OrangutanSPIMaster/OrangutanSPIMaster.h>
#include <pololu/OrangutanSVP/OrangutanSVP.h>

I hope this is what you need.
louisstraub
 
Posts: 7
Joined: Fri Mar 05, 2010 10:49 am

Re: Can't find pololu/orangutan.h

Postby paul on Sun Mar 07, 2010 9:46 am

Okay, that was clear! It looks like you are trying to compile the .c file directly somehow instead of loading the project (.aps) file. You can note that there are actually no errors about orangutan.h, just errors in the linking step because it is not being linked against our library. If you load the .aps file, does it work?

-Paul
User avatar
paul
Site Admin
 
Posts: 912
Joined: Sun Nov 30, 2003 12:06 am
Location: Las Vegas, NV

Re: Can't find pololu/orangutan.h

Postby louisstraub on Mon Mar 08, 2010 7:36 am

Please ignore this post.............
Last edited by louisstraub on Mon Mar 08, 2010 10:26 am, edited 1 time in total.
louisstraub
 
Posts: 7
Joined: Fri Mar 05, 2010 10:49 am

Re: Can't find pololu/orangutan.h

Postby louisstraub on Mon Mar 08, 2010 8:12 am

I just got a successful build and programmed the 3PI. I followed the instructions in 7. Using the Pololu AVR Library for your own projects. I didn't realize that there were library and linker changes required. I just want to thank you again. There's nothing like seeing a program work!!!!
louisstraub
 
Posts: 7
Joined: Fri Mar 05, 2010 10:49 am

Re: Can't find pololu/orangutan.h

Postby paul on Mon Mar 08, 2010 12:09 pm

Hello,
You should not have to make any linker changes if you start AVR studio by double-clicking on the .aps (project) file. However, if you have it working now, I guess you don't have to worry about that!
-Paul
User avatar
paul
Site Admin
 
Posts: 912
Joined: Sun Nov 30, 2003 12:06 am
Location: Las Vegas, NV

Re: Can't find pololu/orangutan.h

Postby rcntwrm on Tue Jun 29, 2010 9:25 pm

Hi,

Same experience with you louisstraub. Anyway, a very usefull post.

I think section no 7 (esp setting the library and and linker) should goes somewhere in section 6? I could feel there are other newbies like me experiencing the same problem. Don't you think Paul?

ntwrm
rcntwrm
 
Posts: 2
Joined: Tue Jun 29, 2010 9:13 pm

Re: Can't find pololu/orangutan.h

Postby paul on Wed Jun 30, 2010 8:00 am

Thanks for the suggestion. We will try to make this clearer!

-Paul
User avatar
paul
Site Admin
 
Posts: 912
Joined: Sun Nov 30, 2003 12:06 am
Location: Las Vegas, NV


Return to 3pi Robot

Who is online

Users browsing this forum: No registered users and 1 guest