OLED 128x32 with Arduino Micro

EL Wire/Tape/Panels, LEDs, pixels and strips, LCDs and TFTs, etc products from Adafruit

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
scottwoyak
 
Posts: 15
Joined: Fri Dec 26, 2014 5:51 pm

OLED 128x32 with Arduino Micro

Post by scottwoyak »

Hi, I've been using an OLED display with an UNO and love the display. I tried to package up my application with a Micro through and the OLED didn't work. After doing some research I think the Micro doesn't support SPI. Is there a way to get the OLED display to work with the Micro?

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: OLED 128x32 with Arduino Micro

Post by adafruit_support_rick »

The Micro supports SPI, but not through pins 11, 12, and 13. You have to use the dedicated SPI pins. They are on the end of the board opposite the USB plug. Look for pins labeled MO (MOSI), MI (MISO), and SCK.

User avatar
scottwoyak
 
Posts: 15
Joined: Fri Dec 26, 2014 5:51 pm

Re: OLED 128x32 with Arduino Micro

Post by scottwoyak »

Thank you very much. I wired things up like the Micro was a Uno, but it is actually a Leonardo. After changing things around everything works!

User avatar
brunncyr
 
Posts: 1
Joined: Sun Feb 01, 2015 10:23 am

Re: OLED 128x32 with Arduino Micro

Post by brunncyr »

Hi
I am having the same problems... did you have to adapt something in the programm? Could you share your code as well as your wiring?

Thank you very much
Cyril

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: OLED 128x32 with Arduino Micro

Post by adafruit_support_rick »

All you need to do is wire according to the earlier post:
The Micro supports SPI, but not through pins 11, 12, and 13. You have to use the dedicated SPI pins. They are on the end of the board opposite the USB plug. Look for pins labeled MO (MOSI), MI (MISO), and SCK.
Can you post a picture of your OLED and your wiring?

User avatar
scottwoyak
 
Posts: 15
Joined: Fri Dec 26, 2014 5:51 pm

Re: OLED 128x32 with Arduino Micro

Post by scottwoyak »

I don't have a picture anymore - on to my next project already. Take a look at the diagram on this page though: http://arduino.cc/en/Main/arduinoBoardMicro

You can either hook up the pins via the dedicated ICSP header as previously stated or, if you're using a breadboard, just use the pins from the diagram in the above.

DATA = MOSI
CLK = SCK

Lastly, in your code you need to use the hardware SPI constructor shown below. The Adafruit tutorial uses software SPI and uses custom pins for MOSI and SCK.

Adafruit_SSD1306 display(OLED_DC, OLED_RESET, OLED_CS);

The D/C, RST, and CS can be digital pins of your choice

Locked
Please be positive and constructive with your questions and comments.

Return to “Glowy things (LCD, LED, TFT, EL) purchased at Adafruit”