Data Sheet

7. A-Star Arduino libraries
The A-Star can be programmed directly from the Arduino IDE as described in Section 6.2.
To help interface with the on-board hardware on the A-Star 32U4 Prime LV, we provide the AStar32U4Prime
library. The library makes it easy to display information on the LCD, play sounds and music from the buzzer, use
the three pushbuttons, control all three user LEDs, and read the battery voltage level. The AStar32U4Prime library
documentation [https://pololu.github.io/a-star-32u4-prime/] provides detailed information about the library, and the library
comes with several example sketches.
The instructions below explain how to install the AStar32U4Prime library and start using it:
1. If you have not done so already, download the A-Star Software and Drivers [http://www.pololu.com/file/
download/a-star-1.2.0.zip?file_id=0J743] (153k zip). These files are also available from the A-Star repository on
GitHub [https://github.com/pololu/a-star]. Extract the downloaded ZIP file and find the “AStar32U4Prime” folder,
which is inside the “libraries” folder. Copy the downloaded “AStar32U4Prime” folder into the “libraries”
subdirectory inside your Arduino sketchbook directory. You can see the sketchbook location in the Arduino IDE
Preferences dialog, which is available from the File menu. For a typical user, the sketchbook location will be a
folder named Arduino inside the Documents folder. For a typical user running a recent version of Windows, the
“AStar32U4Prime” folder should be installed in this location:
C:\Users\<username>\Documents\Arduino\libraries\AStar32U4Prime
If the “Arduino” or “libraries” directories do not exist yet, you will need to create them.
2. Close the Arduino IDE if it is open, and then restart it.
3. In the Files > Examples menu, locate the entry for the AStar32U4Prime library. This is where you can find
several example sketches that show how to use the library. If you do not see AStar32U4Prime in your Examples
menu, then the library was probably not installed correclty. Try doing step 1 again and restarting the Arduino
IDE.
After you install the AStar32U4Prime library, you can learn more about it by trying the included example sketches
and by reading the AStar32U4Prime library documentation [https://pololu.github.io/a-star-32u4-prime/].
Pololu A-Star 32U4 Users Guide © 2001–2014 Pololu Corporation
7. A-Star Arduino libraries Page 38 of 47