Digole UART/I2C/SPI Display Library

Digole Serial Display Library - Version 005 (02/21/14) - Copyright 2014 Timothy Brown / Digole

  • Split into two separate files (.h and .cpp) to work with the new
    multiple file feature in the Web IDE.
  • Added UART (Serial1) Support.
  • Added I2C (Wire) Support.
  • Added “Demo Code” with instructions on using the library.

New bitmap and sprite handling features coming in the next release!

3 Likes

Hey fellow Sparklers! I’ve been working on this Digole Display Library off and on for the last week or so and I’m extremely close to finishing it! In the mean time, I thought I’d share a preview of a little demo I came up with tonight. I’ve actually added commands in addition to porting the standard ones from the Digole Arduino Library. In particular I’ve added the ability to define and manipulate sprites, plus an easy way to fluidly move those sprites around the screen.

The obvious use here is games, but you can actually use it to great affect for a menu or UI system. (I’ll also be including a special “font” pack in my release that contains a plethora of user interface elements; buttons, icons and so forth.)

Anyway, here’s a very short video showing the fluid movement of a sprite across the screen!

I should have this library released on Monday. :smile:

3 Likes

Wow! SMB FTW! Very nice @timb Definitely drop a link to where I can get one of those displays… because I’ll definitely get one :slight_smile:

And surprisingly no bad flicker effects with shooting video of a display… or you’re a pro video guy too!?

:smiley: I was like, “I need sprites to test with, oh wait, I’ve got all the NES SMB tile sets!” Bullet Bill worked out well because he’s (mainly) a two colored sprite. Color doesn’t transfer well to OLED/GLCDs because you have no pixel intensity control (it’s either on or off), so you really have to go in and apply a halftone effect to grays, which is difficult when you only have a 128x64 canvas!

Anyway, that display is the Digole 1.3" White OLED which runs $14.49 shipped from Canada (or $13.99 from China, but I’d pay the buck-fifty more to get it in a week). You can also get a 0.96" version (with the same 128x64 resolution) in white or blue for $10.49.

They also have a 1.8" True Color OLED for $28.99, which is a killer deal. I’m dying to get one of them, but I’m really on a tight budget the next couple of months.

They all have a beefy 64MHz PIC on them doing the heavy lifting (though you can still pass calls directly through to the controller chip). You can upload a 1KB start screen image and up to 16KB of font data, which is stored in non-volatile memory. The color screen supports the same command sets as the mono displays (so it’s 100% backwards compatible) with the addition of color commands (which support both 1 byte per pixel (256 color) and 3 bytes per pixel (256K color) modes).

Here’s the User’s Manual which gives the raw command set plus the Arduino Library commands. [It’s a bit engrishy, but better than most Chinese documentation.]

I’ve actually only recently started dabbling with video, but I’ve been a serious photographer for as long as I can remember (starting out with my dad’s Canon A-1 35MM SLR in the late 80’s). I suppose most of the fundamentals are the same, no matter if you’re shooting still or video, especially these days with modern DSLRs shooting high-speed 1080p!

I picked up my DSLR right before they started doing halfway decent video (none the less I love my Canon 40D). Anyway, I’m digressing…

I was pretty impressed with the quality of the video too; no tearing or blurring! It took a couple of minutes to get the exposure dialed in just right. Would you believe me if I told you I shot it with my cell phone? Because that’s literally the highest resolution video recording device I own; I’ve been using it to shoot all the videos for my book and they’re coming out really great!

Ugh, I remember 20 years ago carrying (what was essentially) a fucking VCR with a lens and giant ass battery around on my shoulder. Then you’d have to pop a bottle of Dramamine just to watch the tape because it was shakier than Michael J. Foxx filming Cloverfield while on a meth bender in the middle of the San Andreas Fault!

Man, I think I need some sleep… :smiley:

1 Like

timb, you wild man! Great work! I have one of the colour OLED displays and it is an amazing deal for $29US! In fact, I have several cheap 128x64 LCDs that I added the Digole $8 backpack to, making them smart. With serial, I2C and SPI, I often use them for debugging and testing along with final builds. I often use the display with one wire (serial TX). I REALLY look forward to seeing your port. Am I correct in assuming you used I2C in your example?

:smile:

Awexome, when I get some cash I’ll go straight for the color one! They don’t populate the SD card holder though? Any supporting functions for it if we added one?

I hear ya on the DSLR… .I got a Nikon D300 right before the big video push. I still love it though, best high dollar investment I’ve made.

Yeah I use my iPhone for everything typically, but I wish I had something with a better zoom and focus. I also have a Kodak ZI8 but it’s got a tiny screen so it’s hard to tell if something is in focus when you are shooting up close on the desk until after you get it on your computer, and no video monitor…

That last paragraph has more color than a 1.8" True Color OLED from Digole :wink: Hope you got some good rest!

1 Like

LOL! I have not seen anything in Digoles documentation regarding the microSD. However, they have responsed to my questions in the past so I will ask them and report back.

That’s awesome! Very smooth!

@peekay123 Yup! Sprites draw surprisingly fast via I2C. I use mine for testing and debugging a lot as well; because of the raw command set I can just straight up I2C or serial data to it on new platforms that don’t necessarily have a driver library.

I’m actually also adding a debug function to the Digole library that will display the Core’s signal strength, ping time to the Cloud, pin status and the outputs of any variables you want to monitor.

1 Like

timb, enough teasing… publish! Prior to receiving my Sparks, I put together a Teensy 3 and an Adafruit CC3000 breakout for a wireless power meter project. I use a Digole backpack on a cheap 128x64 display for the local display. My next project is to port the code to the Spark but that will take some time. PJRC really has great libraries and support and Spark.io is just starting on that path. So, I look forward to seeing your library. BTW, do you use the Spark Web IDE or local toolchain?

:smiley:

I've just got to finish some header stuff and it should be good to go! I'm working against a deadline on another project this morning, but I'll have time to finish the library this evening. :smile:

In the meantime, check out my WiFi Scanner!

2 Likes

Awexome! Those OLED’s make it super polished :smile:

Shared it on Google+

timb, now I’m salivating. I would love to put that WiFi scanner example on to color Digole I have. Will you be sharing that code (please, please, pretty please) :smile:

I just ordered a color OLED from Digole http://www.digole.com/index.php?productID=859 $32.49 shipped to USA. Eagerly awaiting your library and the display! :smile:

Yup, I'll be posting it tonight as well! It stems from the getWifiSignal function that @BDub and I have been working on. I was working on that and the Digole Library at the same time yesterday, so I thought I'd have a little fun! I'll clean the WiFi Scanner code up, comment it and add a way to offset the text and signal bars so it's positioned right on the Color OLED's larger resolution (you'll have to give me feedback on how it looks, the fonts might be different from what's on the smaller OLEDs).

Apparently I've actually got one on the way myself now. :smile: (Special thanks to a certain forum member, I really appreciate it!)

3 Likes

timb, the fonts are exactly the same on ALL Digole displays. The nice thing is you can grab any U8glib font and download it to the displays flash. I did this on one of my projects. The fonts could also be icons, as long as they are defined as be U8glib standards.

BTW, I emailed Digole yesterday regarding that microSD socket on the board and I am waiting to hear from them.

Oh, when I order from Digole, because I’m in Ottawa (about 400Km from Toronto where they are located) I usually get the stuff marked as “in Canada” the same week. Not rubbing it in of course… just saying :wink:

1 Like

Just ordered mine, can't wait to get the lib and start playing around.

1 Like

Just FYI guys, I’ll have this tomorrow at some point. I broke my finger last night on my right hand so it’s been kind of hard to get things done today. I’m switching over to a left handed DVORAK key map to make typing easier.

1 Like

Damn, I never heard of someone code so hard they broke their finger! Whoa, take it easy man, turn down that Dubstep and stop ragin’ :wink:

1 Like

So… we could say you have a…

Bad pointer?

Ken

2 Likes