pololu / zumo-32u4-arduino-library

Library to help interface with the on-board hardware of the Pololu Zumo 32U4 robot.
https://www.pololu.com/category/170/zumo-32u4-robot
MIT License
66 stars 61 forks source link

Stuff Not declared in USBPause.h #1

Closed mithi closed 8 years ago

mithi commented 8 years ago

Hi, I found this issue while loading the sample codes in my Zumo.

In file included from Balancing.ino:21:0:
/Users/mithisevilla/Documents/Arduino/libraries/Zumo32U4/Zumo32U4.h:13:2: error: #error "This library only supports the ATmega32U4.  Try selecting A-Star 32U4 in the Boards menu."
 #error "This library only supports the ATmega32U4.  Try selecting A-Star 32U4 in the Boards menu."
  ^
In file included from /Users/mithisevilla/Documents/Arduino/libraries/Zumo32U4/Zumo32U4Buttons.h:9:0,
                 from /Users/mithisevilla/Documents/Arduino/libraries/Zumo32U4/Zumo32U4.h:19,
                 from Balancing.ino:21:
/Users/mithisevilla/Documents/Arduino/libraries/Zumo32U4/USBPause.h: In constructor 'USBPause::USBPause()':
/Users/mithisevilla/Documents/Arduino/libraries/Zumo32U4/USBPause.h:44:22: error: 'UDIEN' was not declared in this scope
         savedUDIEN = UDIEN;
                      ^
/Users/mithisevilla/Documents/Arduino/libraries/Zumo32U4/USBPause.h:48:22: error: 'UENUM' was not declared in this scope
         savedUENUM = UENUM;
                      ^
/Users/mithisevilla/Documents/Arduino/libraries/Zumo32U4/USBPause.h:52:24: error: 'UEIENX' was not declared in this scope
         savedUEIENX0 = UEIENX;
                        ^
/Users/mithisevilla/Documents/Arduino/libraries/Zumo32U4/USBPause.h: In destructor 'USBPause::~USBPause()':
/Users/mithisevilla/Documents/Arduino/libraries/Zumo32U4/USBPause.h:59:9: error: 'UENUM' was not declared in this scope
         UENUM = 0;
         ^
/Users/mithisevilla/Documents/Arduino/libraries/Zumo32U4/USBPause.h:60:9: error: 'UEIENX' was not declared in this scope
         UEIENX = savedUEIENX0;
         ^
/Users/mithisevilla/Documents/Arduino/libraries/Zumo32U4/USBPause.h:66:9: error: 'UDIEN' was not declared in this scope
         UDIEN = savedUDIEN;
         ^
In file included from Balancing.ino:21:0:
/Users/mithisevilla/Documents/Arduino/libraries/Zumo32U4/Zumo32U4.h: In function 'bool usbPowerPresent()':
/Users/mithisevilla/Documents/Arduino/libraries/Zumo32U4/Zumo32U4.h:72:12: error: 'USBSTA' was not declared in this scope
     return USBSTA >> VBUS & 1;
            ^
/Users/mithisevilla/Documents/Arduino/libraries/Zumo32U4/Zumo32U4.h:72:22: error: 'VBUS' was not declared in this scope
     return USBSTA >> VBUS & 1;
                      ^
Error compiling.
kevin-pololu commented 8 years ago

Did you make sure to select A-Star 32U4 in the Boards menu, like the error message says?

kevin-pololu commented 8 years ago

Please follow the instructions for installing the board definition add-on in the "Programming using the Arduino IDE" section of the Zumo 32U4 user's guide. Specifically, step 2 covers the installation of the add-on.

mithi commented 8 years ago

Thanks. it works!