The
Zumo32U4 library
[https://www.pololu.com/docs/0J63/6]
contains functions that make it easier to control the
three user LEDs. All three user LED control lines are also LCD data lines, so you will see them flicker when you
update the LCD. The green and red user LEDs also share I/O lines with pushbuttons (see below).
• Two
red
LEDs on the left and right edges of the board indicate when the robot’s infrared emitters are
active on the corresponding side.
• Two
blue
power LEDs under the rear corners of the main board indicate when the robot is receiving
power from batteries (the power switch must be turned on). The left LED is connected to the reverse-
protected and switched battery voltage (VBAT), while the right LED is connected to the output of the main
board’s 5 V regulator.
The left blue LED will become noticeably dimmer as the total battery voltage drops below about
3 V, and this can serve as an indication that a set of alkaline batteries has reached the end of
its useful life. However, rechargeable batteries can be damaged by overdischarge, so we do not
recommend allowing a set of four NiMH cells to discharge to this point. (A voltage divider is
connected to analog pin 1 and can be used to monitor the battery voltage; see
Section 3.8
for
details.)
• A
green
power LED under the center rear edge of the main board indicates when the USB bus voltage
(VBUS) is present.
Pushbuttons
The Zumo 32U4 has four pushbuttons: a
reset button
on the right edge and
three user pushbuttons
located
along the rear edge of the main board. The user pushbuttons, labeled A, B, and C, are on Arduino pin 14 (PB3),
PD5, and Arduino pin 17 (PB0), respectively. Pressing one of these buttons pulls the associated I/O pin to ground
through a resistor.
The three buttons’ I/O lines are also used for other purposes: pin 14 is MISO on the SPI interface, PD5 and pin
17 control the green and red user LEDs, and all three pins are LCD data lines. Although these uses require the
pins to be driven by the AVR (or SPI slave devices in the case of MISO), resistors in the button circuits ensure
that the Zumo will not be damaged even if the corresponding buttons are pressed at the same time, nor will SPI
or LCD communications be disrupted. The functions in the
Zumo32U4 library
[https://www.pololu.com/docs/0J63/6]
take care of configuring the pins, reading and debouncing the buttons, and restoring the pins to their original
states.
LCD
The Zumo 32U4 has a 2×7 header where you can connect the included
8×2 character LCD
[https://www.pololu.com/product/356]
(or any other LCD with the common
HD44780 parallel interface
[https://www.pololu.com/file/download/DMC50448N-AAE-AD.pdf?file_id=0J71]
(109k pdf)). You can adjust the LCD
contrast with the potentiometer to the left of the LCD connector. We recommend using a 2 mm slotted
screwdriver to adjust the contrast.
The
Zumo32U4 library
[https://www.pololu.com/docs/0J63/6]
provides functions to display data on a connected
LCD. It is designed to gracefully handle alternate use of the LCD data lines by only changing pin states when
needed for an LCD command, after which it will restore them to their previous states. This allows the LCD data
lines to be used for other functions (such as pushbutton inputs and LED drivers).
Pololu Zumo 32U4 Robot User’s Guide
© 2001–2015 Pololu Corporation
3. The Zumo 32U4 in detail
Page 13 of 76