6. Balboa 32U4 Arduino library
The Balboa 32U4 can be programmed from the Arduino IDE as described in the preceding sections.
To help interface with all the on-board hardware on the control board, we provide the
Balboa32U4
library
. The
Balboa32U4 library documentation
[http://pololu.github.io/balboa-32u4-arduino-library]
provides detailed information about the library, and the library comes with several example sketches.
If you are using version 1.6.2 or later of the Arduino software (IDE), you can use the Library Manager
to install this library:
1. In the Arduino IDE, open the “Sketch” menu, select “Include Library”, then “Manage
Libraries…”.
2. Search for “Balboa32U4”.
3. Click the Balboa32U4 entry in the list.
4. Click “Install”.
If this does not work, you can manually install the library:
1. Download the
latest release archive from GitHub
[https://github.com/pololu/balboa-32u4-arduino-
and decompress it.
2. Rename the folder “balboa-32u4-arduino-library-master” to “Balboa32U4”.
3. Move the “Balboa32U4” folder into the “libraries” directory inside your Arduino sketchbook
directory. You can view your sketchbook location by opening the “File” menu and selecting
“Preferences” in the Arduino IDE. If there is not already a “libraries” folder in that location,
you should make the folder yourself.
4. After installing the library, restart the Arduino IDE.
After you install the Balboa32U4 library, you can learn more about it by trying the included example
sketches
and
by
reading
the
To use the inertial sensors on the Balboa 32U4, you might also want to install our
[https://github.com/pololu/lsm6-arduino]
and
[https://github.com/pololu/lis3mdl-arduino]
libraries (the
LSM6 library is required to run the Balboa32U4 library’s “Balancer” example).
If you are using your Balboa 32U4 with a Raspberry Pi, you might also want to make use of our
Raspberry Pi slave library for Arduino
[https://github.com/pololu/pololu-rpi-slave-arduino-library]
, which
sets up the A-Star as an I²C slave and helps establish communication with a Raspberry Pi master.
See
for more information about the Raspberry Pi interface.
Pololu Balboa 32U4 Balancing Robot User’s Guide
© 2001–2019 Pololu Corporation
6. Balboa 32U4 Arduino library
Page 77 of 97