Shop OBEX P1 Docs P2 Docs Learn Events
A cheap OLED screen that you can simply send text to... — Parallax Forums

A cheap OLED screen that you can simply send text to...

3dogpottery3dogpottery Posts: 78
edited 2019-04-02 18:32 in Propeller 1
I wanted a small display that I could send text to that was easy to use and cheap. I found the little .96” I2C 128x64 OLED Display Modules on eBay for about $8.00 each. However, you can’t write to the display by simply sending text to it. So, I wrote a spin program that allows you to do exactly that. I uploaded it to Parallax’s Object Exchange. It is called “SSD1306_Driver_Plus” to differentiate it from similarly named objects. Enjoy!

http://obex.parallax.com/object/906

Comments

  • PublisonPublison Posts: 12,366
    edited 2019-04-02 20:43
    How timely! Just got my displays today. Object runs like a champ. At least my pins were marked correctly on theses displays.:)

    This is the one I bought:
    https://www.ebay.com/itm/0-96-I2C-IIC-Serial-128X64-White-OLED-LED-Display-Module-for-Arduino-SSD1306/391742247377?epid=2160091528&hash=item5b35a851d1:g:XUwAAOSwe6ZaaVsV:sc:USPSFirstClass!06825!US!-1&frcectupt=true
  • That's the display used on the BadgeWX unit and there is a driver for it in the badge library.

    Mike
  • Publison: Yes, that is the one I used.
    iseries: Yes, there are plenty of libraries out there for the SSD1306 driver. I just like writing programs to keep my over 70 year old brain active.
  • iseries wrote: »
    That's the display used on the BadgeWX unit and there is a driver for it in the badge library.

    Mike

    The one used here uses I2C, not SPI like the badge.
  • Hi! I'm working on a more generic Propeller C library for graphical displays, and the SSD1306 (SPI and I2C) will be included.

    You can grab it from here right now in it's current state:
    https://github.com/parallaxinc/Simple-Libraries/tree/demo/Learn/Simple Libraries/Display
  • I do have a question concerning the Object Exchange: If you post an object and want to fix a bug or make a change, how do you do that without posting multiple objects? Is there a way to "edit" the posted object?
  • This is great, because the other OLED drivers in the Obex are a few years old, and support other types of modules. But this module uses I2C and it's the one you find everywhere now.

    Hey, I've got a request...since you're thinking of upgrading the driver, can you take a look at the Adafruit OLED Driver and Demo in the Obex? It's got a lot of interesting features implemented, specifically large text - those tiny letters are hard to read!
  • 3dogpottery3dogpottery Posts: 78
    edited 2019-04-03 12:58
    Hi Jeff
    Each row (or “page”) is 128 bits long. The letters are 7 bits tall and 5 bits wide with one extra blank bit in both dimenttions for spacing. Thus, each letter is 8x6 bits. This means that you can have 21 letters of print across, i.e., 128 / 6 = 21.3. If you double the size of the print, you could only get 10 letters of print across. This would also cut the number of rows in half. It would also be much more difficult programmatically to write to the OLED screen since each row or “page” would have 1/2 of the larger text. So, the size of print is a compromise. That being said, the text is much more readable if you use all caps.

    Yes, the Adafruit OLED Driver is amazing. It probably could be converted to communicate via I2C.

    There is also availability a 1.3” I2C OLED which is much more readable, However, it uses the SSH1106 controller. For some reason, I’m not able to put it into horizontal address mode to clear the OLED screen. When I figure that out, I will upload that to the OBEX exchange.

    In the mean time, I just purchased Parallax's WXESP8266 WiFi Module and I am going to use their Simple C tutorials to learn how to use this new toy. So, programming is just a hobby that helps my ageing brain stay active... along with my pottery. I've been a potter for over 20 years. But I made my living working as a technician for a power utility in Reno. Anyway, I guess I'm bloviating.
  • 3dogpottery3dogpottery Posts: 78
    edited 2019-04-03 12:10
    Oh, and you might take MattMatz up on his offer. He says he’s writing a generic Propeller C version. I used to program in C, but it’s been some time.
  • If you need color, look at the SSD1331 displays. There are C and Spin code for those.
  • I've added scrolling to the SSD1306_Driver_Plus object.

    http://obex.parallax.com/object/906
  • I do have a question concerning the Object Exchange: If you post an object and want to fix a bug or make a change, how do you do that without posting multiple objects? Is there a way to "edit" the posted object?

    Sure. You can delete the buggy original and upload a new. Sorry to have admit I had to do that once.
  • I just checked out the update with the scrolling. Nice!
  • 3dogpottery3dogpottery Posts: 78
    edited 2019-04-05 14:18
    Jeff Haas wrote: »
    I just checked out the update with the scrolling. Nice!

    You may like the latest update. It now works similarly to FullDuplexSerialPlus as far as input to the screen goes. I've added the functions "Dec( )" which prints a decimal number and "Bin( )" which prints the binary of the argument. I've also added a tx( ) function for Carriage Return and CLear Screen. The "Page( )" function is still there, but I believe that most folks are more comfortable with "tx(CR)" to move to the next line. Here is a link for the latest update:
    http://obex.parallax.com/object/906

    There is a module that has a larger screen (1.3 inches as opposed to .96 inches) that is much easier to see. Here is a link for the one I purchased:
    https://www.ebay.com/itm/1PCS-Blue-1-3-I2C-IIC-128X64-OLED-LCD-Display-Module-for-Arduino-STM32-AVR/172281014708?ssPageName=STRK:MEBIDX:IT&_trksid=p2057872.m2749.l2649

    It uses the SH1106 controller, so you would have to use the object I wrote for it. The SH1106 controller doesn't have as many built in features as the SSD1306 (like scrolling and three addressing modes) but it is much easier to see text. Here is a link to the object:
    http://obex.parallax.com/object/907
  • Nice update.

    Do you have a picture of the bigger OLED running your object? Curious how it looks with text, instead of the ebay listing which is graphics.
  • 3dogpottery3dogpottery Posts: 78
    edited 2019-04-10 08:48
    Here's a picture of the .96" screen displaying some text...
    4000 x 3000 - 3M
  • 3dogpottery3dogpottery Posts: 78
    edited 2019-04-11 15:42
    And here's a picture of the 1.3" screen. This is the screen that I'm using for my Propeller_GPS.
    4000 x 3000 - 3M
  • How about some pictures of your handheld gps?
    Jim
  • RS_Jim wrote: »
    How about some pictures of your handheld gps?
    Jim

    Y’all must know that the my Propeller_GPS is just for fun. I was curious about those GPS modules that I saw for sale on eBay, and how they worked. And so, I used my favorite microcontroller to experiment with one. I only offer my Propeller_GPS object for you to have some fun with, to add to, or laugh at. If you want a practical GPS, this is not it. That being said, I did order a small project box from Amazon that has a clear cover which will be ideal for mounting my GPS. In fact, it just arrived today. I will post a picture of the completed unit when I’m finished.
Sign In or Register to comment.