I2C Oled (two libraries)

madias
Thu Apr 30, 2015 6:13 am
Hello,
I think, I’ve posted them before, but they are not here? Did I dreamt that? :)
OK:
Two different OLED ports of mine:
The Adafruit Version: With Hardware I2c (I don’t know if the SPI version is working, because I don’t own a SPI variant. Testers are welcome!)
The Henning Karlsen Version: Only SW I2c, since Henning is doing the whole I2c stuff “by hand” (Didn’t have the time for that, but I tested the library on my PIC32 HW + SW version and the SW version isn’t really slower and you can use any pin you want)
Attachements are to large, so please download it from my drive account:
https://drive.google.com/file/d/0B3sgtw … sp=sharing
https://drive.google.com/file/d/0B3sgtw … sp=sharing

regards
Matthias


RogerClark
Wed May 27, 2015 7:24 am
Hi Matthias

Should I add these to the libraries folder ?


madias
Wed May 27, 2015 7:54 am
I think, there is nothing wrong to push them into the repo.
The adafruit one is working for (real HW) I2c and SPI and the Karlsen one is software I2c (sometimes a “nice to have”)

RogerClark
Wed May 27, 2015 9:40 am
OK.

They may as well be in the repo, as it may make them easier for people to find

Thanks

Edit.

They are both now in the repo.

Thanks.


tj_style
Tue Jun 02, 2015 5:34 am
Hi madias,

Are what upload method do you use ?
the strange problem is when I use Serial upload the sketch is working fine, but when using Maple DFU the sketch is doesn’t run.
Any sugestion?


RogerClark
Tue Jun 02, 2015 5:38 am
This issue may be related to changes to platform.txt

So can we wait until @tj_style has tried an older version of platform.txt that has –whole-archive in it.


madias
Tue Jun 02, 2015 8:46 pm
Ok, I tested the (adafruit hardware) I2c oled library with maple mini again.
Test conditions:
Board: Maple mini clone
IDE 1.6.3
OS: OSX 10.9.5
(nearly) latest branch of STM32 Arduino
Code: My library example: ssd1306_128x64_i2c_STM32
Upload method: Maple DFU (which doesn’t work for you)
Both hardware I2c ports (changeable in Adafruit_SSD1306_STM32.cpp) are working without problems.
TJ_style: the default is I2c Port 2, this is sharing with tx/rx port 3. Maybe setup I2c Port 1 in the lib and test it again?
Otherwise there are too less infos you have given to us (see my point list under “test conditions”)
Edit: tried the latest branch of today and it works.

RogerClark
Tue Jun 02, 2015 9:38 pm
Guys

It’s strange this doesn’t seem to work with USB serial enabled.

There is virtually no difference between the maple mini version of the bootloader and the generic one, its just a few lines of code to toggle the reset hardware differently.

Also, I think the F103C board variant, is basically just a copy of the maple mini, but I can’t remember if anyone re ordered the PIN MAP so it was in port / pin order.

I think tj_style is saying that if he enables USB serial, even without the bootloader it crashes, but he would need to confirm this.

Btw. Matthias, can you send a link to the display, I’m not sure if I have one or not.


madias
Tue Jun 02, 2015 9:41 pm
Roger, here you go!
http://www.aliexpress.com/item/Free-Shi … 00972.html
There are 2 or 3 versions of the same display. SPI or I2c only (the only difference are the breakout pins, resistors. The controller supports both)

RogerClark
Tue Jun 02, 2015 9:42 pm
Thanks

madias
Tue Jun 02, 2015 9:50 pm
BTW: Anyone who mount this display into a – esthetic looking – finished project?
I ponder how to fix it onto a front panel my ideas are using a separate acryl glass panel (5mm) recessed only the visible region and the rest sprayed black on the back. (It’s to thin, even for a 3mm front panel!)

RogerClark
Tue Jun 02, 2015 10:12 pm
Matthias

I think I have this display

I will try connecting it later


RogerClark
Tue Jun 02, 2015 10:13 pm
madias wrote:BTW: Anyone who mount this display into a – esthetic looking – finished project?
I ponder how to fix it onto a front panel my ideas are using a separate acryl glass panel (5mm) recessed only the visible region and the rest sprayed black on the back. (It’s to thin, even for a 3mm front panel!)

ahull
Tue Jun 02, 2015 11:11 pm
madias wrote:BTW: Anyone who mount this display into a – esthetic looking – finished project?
I ponder how to fix it onto a front panel my ideas are using a separate acryl glass panel (5mm) recessed only the visible region and the rest sprayed black on the back. (It’s to thin, even for a 3mm front panel!)

tj_style
Wed Jun 03, 2015 1:53 am
madias wrote:Ok, I tested the (adafruit hardware) I2c oled library with maple mini again.
Test conditions:
Board: Maple mini clone
IDE 1.6.3
OS: OSX 10.9.5
(nearly) latest branch of STM32 Arduino
Code: My library example: ssd1306_128x64_i2c_STM32
Upload method: Maple DFU (which doesn’t work for you)
Both hardware I2c ports (changeable in Adafruit_SSD1306_STM32.cpp) are working without problems.
TJ_style: the default is I2c Port 2, this is sharing with tx/rx port 3. Maybe setup I2c Port 1 in the lib and test it again?
Otherwise there are too less infos you have given to us (see my point list under “test conditions”)
Edit: tried the latest branch of today and it works.

RogerClark
Wed Jun 03, 2015 2:01 am
Can you explain the 2 I2C’s you are using and why?

I’m not sure many people have used 2 separate I2C channels at the same time, this is more likely to be the issue


tj_style
Wed Jun 03, 2015 2:19 am
RogerClark wrote:Can you explain the 2 I2C’s you are using and why?

I’m not sure many people have used 2 separate I2C channels at the same time, this is more likely to be the issue


RogerClark
Wed Jun 03, 2015 3:06 am
@tj_style

Ok.

Thanks for the clarification

This looks like its something to do with PB10 and PB11 also being HW Serial 3

#define BOARD_USART3_TX_PIN PB10
#define BOARD_USART3_RX_PIN PB11


ahull
Wed Jun 03, 2015 11:58 pm
madias wrote:BTW: Anyone who mount this display into a – esthetic looking – finished project?
I ponder how to fix it onto a front panel my ideas are using a separate acryl glass panel (5mm) recessed only the visible region and the rest sprayed black on the back. (It’s to thin, even for a 3mm front panel!)

RogerClark
Thu Jun 04, 2015 12:19 am
Andy

Thats an interesting idea

I have a 3D printer (kit Mendle Max), but don’t use it that much.

Its not too bad for printing custom boxes with cutouts etc, but of course they look like they are 3D printed.

The PCB idea gives a more polished finish to the project, but I guess it does end up looking like its made of PCB to anyone who knows what that looks like

I’ve also used battery boxes as cases quite a lot.

Image

Because if you buy a 4 x AA cell switched enclosure, you can run a STM32 etc (or EPS8266) on 2 batteries, and use the switch on the box, and but the electronics in the space where the other 2 batteries went (after cutting out the plastic with side cutters etc)
In the boxes I buy, you can simply pull out the metal inserts and moved the final +ve insert to where the 2nd battery is, though I don’t know if all boxes will let you do that.


mrburnette
Thu Jun 04, 2015 12:40 am
ahull wrote:madias wrote:BTW: Anyone who mount this display into a – esthetic looking – finished project?
I ponder how to fix it onto a front panel my ideas are using a separate acryl glass panel (5mm) recessed only the visible region and the rest sprayed black on the back. (It’s to thin, even for a 3mm front panel!)

naturalist
Wed Jun 17, 2015 8:25 am
Hi everybody.
I just made sketch for my oled.

sh1106_display.JPG
SH1106 oled display
sh1106_display.JPG (98.39 KiB) Viewed 4252 times

RogerClark
Wed Jun 17, 2015 8:28 am
Cool

Thanks for letting us know


bigplik
Thu Jul 02, 2015 10:17 pm
Hi Guys, I’ll try to use SSD1306 I2C library but it doesn’t show anything, on my avr same display shows adafruit samples, but here after I added library from this post, choose example I2C STM32, nothing happen, on both I2C ports, is anything else to set if I want to use this library and example code?

mrburnette
Thu Jul 02, 2015 11:36 pm
bigplik wrote:Hi Guys, I’ll try to use SSD1306 I2C library but it doesn’t show anything, on my avr same display shows adafruit samples, but here after I added library from this post, choose example I2C STM32, nothing happen, on both I2C ports, is anything else to set if I want to use this library and example code?

bigplik
Fri Jul 03, 2015 7:10 am
hi,
AVR is working in my case, just ARM isn’t work,
my display is 2.42″ OLED SSD1306, no problem
with standard Adafruit SSD1306 library on avr’s,
I used I2C scanner and address for my display is 0x3C,
like in the oryginal Adafruit SSD1306_STM32 library,
I connected it into both I2C ports in Maple Mini,
upload made by ArduinoIDE 1.6.1,
I2C1 port is – SDA on pin 15, and SCL on pin 16
I2C2 port is – SDA on pin 0, and SCL on pin 1

maybe my wiring is wrong?
or Adafruit GFX library for STM32 case should be different than
same library for avr boards?
don’t know


tj_style
Fri Jul 03, 2015 1:03 pm
bigplik wrote:hi,
AVR is working in my case, just ARM isn’t work,
my display is 2.42″ OLED SSD1306, no problem
with standard Adafruit SSD1306 library on avr’s,
I used I2C scanner and address for my display is 0x3C,
like in the oryginal Adafruit SSD1306_STM32 library,
I connected it into both I2C ports in Maple Mini,
upload made by ArduinoIDE 1.6.1,
I2C1 port is – SDA on pin 15, and SCL on pin 16
I2C2 port is – SDA on pin 0, and SCL on pin 1

maybe my wiring is wrong?
or Adafruit GFX library for STM32 case should be different than
same library for avr boards?
don’t know


mrburnette
Fri Jul 03, 2015 3:21 pm
bigplik wrote:<…>
maybe my wiring is wrong?
or Adafruit GFX library for STM32 case should be different than
same library for avr boards?
don’t know

bigplik
Fri Aug 07, 2015 6:44 pm
mrburnette wrote:bigplik wrote:<…>
maybe my wiring is wrong?
or Adafruit GFX library for STM32 case should be different than
same library for avr boards?
don’t know

bigplik
Fri Aug 07, 2015 6:48 pm
naturalist wrote:Hi everybody.
I just made sketch for my oled.sh1106_display.JPG

martinayotte
Fri Aug 07, 2015 7:17 pm
bigplik wrote:mrburnette wrote:
Maybe try this:
https://www.hackster.io/rayburne/oled-t … ter-for-10

Ray


Leave a Reply

Your email address will not be published. Required fields are marked *