When Becky and I started this dog collar project, Arduino 1.0.1 had just come out with support for the Arduino Leonardo. I had an Adafruit 32u4 breakout board on hand, and thought it would be a good way to test it out with the official Leonardo bootloader. I used a USBtinyISP and the Arduino software to burn the Leonardo to the 32u4 breakout board without any issues.
My first step was getting the tiny, and awesome Adafruit Monochrome 128x32 OLED to work with the Leonardo software.
My first step was getting the tiny, and awesome Adafruit Monochrome 128x32 OLED to work with the Leonardo software.
The only real issue I ran into was matching up the pins from the Atmega32u4 to the pins in the code examples/libraries for the OLED display. I ended up creating a pin reference sheet similar to this one by Johngineer (which is much better than mine).
At the top of the code, I have comments showing what OLED pins match up to which pins on the 32u4 breakout.
At the top of the code, I have comments showing what OLED pins match up to which pins on the 32u4 breakout.
#define OLED_DC 6 //Atmega32u4 Breakout Pin D7 #define OLED_CS 9 //Atmega32u4 Breakout Pin B5 #define OLED_CLK 5 //Atmega32u4 Breakout Pin C6 #define OLED_MOSI 4 //Atmega32u4 Breakout Pin D4 (Pin on OLED labeled DATA) #define OLED_RESET 8 //Atmega32u4 Breakout Pin B4
I also show where to connect up the Adafruit Ultimate GPS module.
//Connect GPS TX to Atmega32u4 Breakout Pin B7 (Leonardo Pin D10) //Connect GPS RX to Atmega32u4 Breakout Pin B6 (Leonardo Pin D11)
Text editor powered by tinymce.