DanielRubioL / u8glib

Automatically exported from code.google.com/p/u8glib
Other
0 stars 0 forks source link

SSD1306 u8glib on PRO MICROS #278

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hi, i bought a pro micro version of arduino. This version do not come with A4 
and A5.. just came with A0 /A1 /A2 / A3. How can i use a OLED display( with 
four pins ->  VCC(ok), GND(ok), SCL(?), SDA(?)) with this arduino? It is 
possible to change de A5 and A4 to A3 and A2 ?

Arduino
https://www.foxytronics.com/products/257-leonardo-pro-micro
http://www.aliexpress.com/snapshot/6152671168.html

Display
http://www.aliexpress.com/snapshot/6146844733.html

My main email is antenor.d@hotmail.com
thanks in advanced!

Original issue reported on code.google.com by antenor...@gmail.com on 9 Sep 2014 at 12:27

GoogleCodeExporter commented 8 years ago
I think SDA is on pin 2 and SCL on pin 3

Original comment by olikr...@gmail.com on 9 Sep 2014 at 4:58

GoogleCodeExporter commented 8 years ago
thanks... and how i say to u8glib that pin 2 and 3 should be used perhaps A4 
and A5?

Original comment by antenor...@gmail.com on 9 Sep 2014 at 9:56

GoogleCodeExporter commented 8 years ago
U8GLIB_SSD1306_128X64 u8g(2,3); ???

Original comment by antenor...@gmail.com on 10 Sep 2014 at 1:52

GoogleCodeExporter commented 8 years ago
The pin numbers are not important for U8glib (U8glib just taks to the I2C 
subsystem).
So you can use
U8GLIB_SSD1306_128X64(U8G_I2C_OPT_NONE)
or
U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NO_ACK)

Original comment by olikr...@gmail.com on 10 Sep 2014 at 6:30

GoogleCodeExporter commented 8 years ago
I am successfully using a (cheap/generic eBay) SSD1306 I2C 128x64 OLED display 
with the latest U8glib (as of 11/5/2014) on my Arduino Pro Micro.  To make it 
work just add this to the top of your .pde:

U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NO_ACK)

...and make sure that you connect SDA to pin 2 and SCL to pin 3.  That's all 
there is to it.

FYI: The pinout diagram for the Pro Micro (which shows that pins 2 and 3 are 
SDA/SCL) can be found here:  
https://learn.sparkfun.com/tutorials/pro-micro--fio-v3-hookup-guide/hardware-ove
rview-pro-micro

Original comment by riskable on 6 Nov 2014 at 3:37

GoogleCodeExporter commented 8 years ago
Thanks for providing this additional information.

Original comment by olikr...@gmail.com on 6 Nov 2014 at 8:41