Hi, I have one of your SSD1306 Monochrome OLED breakout boards working with an ARDUINO Mega. This Mega will eventually have a data logger shield on it, so I don't think I can use digital pins 9-13 for the OLED_MOSI, OLED_CLK, OLED_DC, OLED_CS, and OLED_RESET, respectively. (I understand the logger shield uses digital pins 10-13, no?)
I tried using pins 20,22,24, 26 and 28 instead:
#define OLED_MOSI 20 //this assumes you are using a MEGA!
#define OLED_CLK 22
#define OLED_DC 24
#define OLED_CS 26
#define OLED_RESET 28
Adafruit_SSD1306 display(OLED_MOSI, OLED_CLK, OLED_DC, OLED_RESET, OLED_CS);
It didn't work. Any advice? I chose those pins on the Mega because they're at the bottom of the board, not likely to adversely interact with the shield at all.
Thanks!
SSD1306 128x32 spi oled breakout; changing the digital pins
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- daveoregon
- Posts: 31
- Joined: Fri Aug 24, 2012 3:27 pm
- Franklin97355
- Posts: 23912
- Joined: Mon Apr 21, 2008 2:33 pm
Re: SSD1306 128x32 spi oled breakout; changing the digital p
You will need to use a software spi library if you move the pins. Try this site for more info http://www.iesensor.com/blog/2013/07/09 ... -mega2560/
- daveoregon
- Posts: 31
- Joined: Fri Aug 24, 2012 3:27 pm
Re: SSD1306 128x32 spi oled breakout; changing the digital p
Thanks, but that's not straightforward enough for me to implement at this time.
I think I'll try using a "character LED" shield, which claims to be able to use "Any data pins you want" (https://learn.adafruit.com/character-lc ... racter-lcd)
Does that sound reasonable?
I think I'll try using a "character LED" shield, which claims to be able to use "Any data pins you want" (https://learn.adafruit.com/character-lc ... racter-lcd)
Does that sound reasonable?
- Franklin97355
- Posts: 23912
- Joined: Mon Apr 21, 2008 2:33 pm
Re: SSD1306 128x32 spi oled breakout; changing the digital p
Get one of these while you're there, it will make life so much easier. https://www.adafruit.com/products/292
Please be positive and constructive with your questions and comments.