Pololu Robotics & Electronics
My account Comments or questions? About Pololu Contact Ordering information Distributors

A-Star LCD and buttons


I noticed the button pins ABC are shared with DB4, DB7 and DB5 pins, how do I configure the pins, I want to use the buttons to control the LCD for entering parameters.



Although the A-Star 32U4 Prime’s on-board buttons share the same pins as the LCD, you should be able to use those buttons to control the LCD screen. You should look at the “Buttons” example on our GitHub page for the A-Star 32U4 Prime. (You can also find the “Buttons” example in the AStar32U4Prime library installed on your computer, which should have been installed along with the A-Star’s drivers and software.)

Please note that if you have the microSD version of the A-Star Prime, you should make sure that CS is not connected to GND since the microSD feature cannot be used with button A. For more information, see microSD card connector and level shiters under the “A-Star 32U4 Prime pinout and components” section of the Pololu A-Star 32U4 User’s Guide.

- Amanda


I am working on a small application where I can store the name of a parameter set into the eeprom memory so you can see this name the next time it powers up.

Pseudo code:
Read array of 4 uint8 values
Show first on LCD
Increase with A button
Decrease with C buton
Move to next with B button
After last digit save in eeprom

In the ASCII table the value of “A” in DEC is 65, this can be increased to 66, 67 or decreased easily. The only thing I could not find is how to translate the 65 into the A on the LCD, is there a standard function to do this?



You can use LCD.write() to print characters to the A-Star’s LCD screen. For example, LCD.write(65) and LCD.write('A') should both result in the character ‘A’ being printed.

- Amanda