Digole UART/I2C/SPI Display Library

@RWB, check out the new post to get the library (just for you!) and instructions :smile:

@RWB, check out the new post to get the library (just for you!) and instructions :smile:

@peekay123 You Da Man!

I’ll check it out now and report back.

1 Like

@peekay123

I loaded up your code to Arduino IDE. The first error I got was because of the application.h file for the Spark Core. I removed the application.h files and that error went away.

Then the next error I get after a few seconds of compliing is the following:

Adafruit_GFX\Adafruit_GFX.cpp.o: In function `Adafruit_GFX::setFont(unsigned char)':
C:\Users\RWB\Arduino\libraries\Adafruit_GFX/Adafruit_GFX.cpp:91: undefined reference to `timesNewRoman_8ptBitmaps'
C:\Users\RWB\Arduino\libraries\Adafruit_GFX/Adafruit_GFX.cpp:91: undefined reference to `timesNewRoman_8ptDescriptors'
C:\Users\RWB\Arduino\libraries\Adafruit_GFX/Adafruit_GFX.cpp:91: undefined reference to `centuryGothic_8ptBitmaps'
C:\Users\RWB\Arduino\libraries\Adafruit_GFX/Adafruit_GFX.cpp:91: undefined reference to `centuryGothic_8ptDescriptors'
C:\Users\RWB\Arduino\libraries\Adafruit_GFX/Adafruit_GFX.cpp:91: undefined reference to `comicSansMS_8ptBitmaps'
C:\Users\RWB\Arduino\libraries\Adafruit_GFX/Adafruit_GFX.cpp:91: undefined reference to `comicSansMS_8ptDescriptors'
C:\Users\RWB\Arduino\libraries\Adafruit_GFX/Adafruit_GFX.cpp:91: undefined reference to `testBitmaps'
C:\Users\RWB\Arduino\libraries\Adafruit_GFX/Adafruit_GFX.cpp:91: undefined reference to `testDescriptors'
C:\Users\RWB\Arduino\libraries\Adafruit_GFX/Adafruit_GFX.cpp:91: undefined reference to `arial_8ptBitmaps'
C:\Users\RWB\Arduino\libraries\Adafruit_GFX/Adafruit_GFX.cpp:91: undefined reference to `arial_8ptDescriptors'
collect2.exe: error: ld returned 1 exit status

I’m pretty sure this had to do with the Teensy 3.1 being a ARM 32 processor. I found at thread on the Teensy 3 that is going over how its a common problem with the GFX library and the Teensy 3.1 Processor.

This thread is talking about it if you care to look at it: http://forum.pjrc.com/threads/19-Error-compiling-with-Adafruit-GFX-library

So let me know what needs to be changed with your code so it works with Arduino if its more than removing the application.h code. That’s the only error message I got while compiling other than the error above which I should be able to find a solution to shortly.

Regardless good work! I can see how it all works now after reading your PDF.

You earned that $200. Just tell me where to send it. :smile:

Have fun at the Maker Fair , I never been to one yet but would like to.

@RWB, for it to work well on the arduino, I will need to re-add the PROGMEM references and possibly change some of the code. It should work as-is for now. But why Arduino, you have an amazing Spark!!

As for the $200, please donate it to your local cancer society. I lost both my mother and sister to that disease. Thank you.

1 Like

@peekay123

I had to go with the Teensy 3.1 because its got the horsepower and tons of memory to work with the Sharp Memory LCD’s. The Spark just does not have the memory and I don’t really need the WiFi for this main project I’m working on. And the price for the Teensy 3.1 is much cheaper also so it just fits the bill without the need for adding memory chips and all that jazz.

Plus your library for the Sharp Memory LCD is the first that works with the Spark Core, up till now there has not been any way to use the Memory LCD with the Spark Core.

I will donate and provide proof of it when I do. I lost my Grandfather to Cancer also way back when I was a little kid.

So are you saying the current library should compile for Arduino now or only after you re-add some code?

@RWB, you can give it a shot but I am working on it now. Hopefully I can be finished tonight.

UPDATE: I just finished regressing back to Arduino and was able to compile on IDE 1.55r2. I just compiled the whole thing in a single folder as multiple tabs. You will need to test it. I will update my github to include the new folder and files.

@RWB, all done! Go get it while its hot. Let me know how it works. I am not sure about a couple of lines of code so you are my tester :smile:

Cool, Testing it out now!

I tried a few things myself but no luck.

@peekay123

Yea buddy it took me awhile to get it all working but it is indeed working on the Teensy 3.1 with the Sharp Memory LCD. I had to delete all the other GFX and Sharp Memory LCD libraries I had installed to get it to compile.

I tested a few fonts that you have loaded on there and I can see what you mean about the fonts becoming distorted when you blow them up to size 2 or 3.

What point size were the fonts when you imported into TheDotFactory? 8 Points?

I’m happy to see this up and working and I’m sure there will be many other people out there who will also be happy that you created this solution. Be sure to post it up at Adafruit.

I’m short on time right now but I’ll be sure to get more familiar with this by adding new fonts until I get everything the way I want it and then comeback with some pictures to share.

I did notice that some of the fonts were missing the lower case a. And for some reason Hello World would not display right on some of the alternative fonts for some reason. It would display some other text for some reason for hello world. All works as it should for the default Arial_8 though. I assume its because one of the letters were left out of the font array when the converted with TheDotFactory.

THANK YOU SO MUCH for making this happen!

@RWB I forgot a step in my instructions! You need to delete the comments in the descriptor table that show each character. Some of those characters screw things up like the missing a!!!

@peekay123 Cool, glad it was a easy fix.

How helpful was the code from the first guy who tried adding fonts.

@RWB, his code inspired me but was only slightly helpful. What was more helpful was TheDotFactory cause when I saw the data it produced, I knew exactly how to adapt the library. BTW, I will be updating the readme.pdf file with the extra instructions later today. :smile:

I have not tried the Sharp Memory Display hooked up to the Spark Core Yet but assuming it does work now how much Flash and SRAM does the Spark Core really have to work with at this point in time with the current firmware?

The 128x128 pixel display requires about 2500 bytes of SRAM for a screen buffer. The 2.7 inch one I’m working with requires 12,000 bytes of memory.

I was watching a video from an Sharp LCD engineer and it kinda sounds like he is saying that you do not need a screen buffer cause you can use the screen as a memory chip. Maybe I’m wrong or maybe this engineer knows something everybody else does not.

Here is the video link, tell me what you think: https://www.youtube.com/watch?v=b482S0jl5To

@RWB, you are correct regarding the memory allocation. A larger display will not run on the spark. Even the 128x128 display may not work depending your other code’s memory requirements. From the video it sounds like a frame buffer is not required but Adafruit DOES use one so I will have to do some research to see if I can remove it.

UPDATE: There are two methods for buffering - frame and line. The reason most libraries use a full frame buffer is for refresh speed. The line buffer approach takes very few bytes of RAM but refreshes one line at a time whereas the frame buffer approach refreshes an entire screen at a time. Line buffering requires more work since you are “slicing” into lines whereas a frame buffer is a “shadow” of the screen and so much easier to handle in the program. Bottom line: use frame buffering so you need RAM which means for larger displays Spark is a non-starter. :frowning:

@peekay123 Thanks for looking into that. So I assume we could get past the memory problem by using @kennethlimcp latest FRAM + SD Card breakout for the Spark Core.

The Teensy 3.1 is a killer tiny microprocessor with lots of built in memory. Loving it. When its overclocked at 96 mhz applications just fly compared to any other micro out there. Only $17 at http://store.oshpark.com/products/teensy-3-1

Working on adding new fonts to GFX library now. Working on the laptop in the truck while the wife is shopping at Target :smile:

@RWB, before I got my Spark Cores, I was using a Teensy 3.0 with a CC3000 breakout. I love the Teensy line and they are WAY better than an plain Arduino for a lot of projects. I can’t wait for the next Spark to have loads of flash and RAM.

I think I will get a Sharp Mem display to look at different ways of writing data to it. I will also discuss this with timb once he’s regained his health. I would love to see a SharpMem version of a Digole display or at least a backpack that would work with those displays. Hmmm… PRODUCT IDEA!!! :open_mouth:

@peekay123 What happened to Tim B?

The Sharp 2.7 displays are almost impossible to buy right now. Mouser has a 1000+ coming in a few months but none right now. I caught them when they had a few hundred in stock a month ago and picked up 2 of them. Just ripped the flex connector off the 2.7 inch on accident when my breadboard wires got caught on the door latch when I was leaving in a hurry today. Good thing I have 1 spare 2.7 inch to work with for now.

The 1.28 inch 128x128 pixel version is better than the screen Adafruit sells in my opinion, I like the black text better, the silver is harder to see. The 128x128 pixel versions are easy to get and are instock at Mouser.

If you have never had one before I would just buy the Adafruit silver screen and breakout and then also buy the 128x128 black pixel version so you can swap them out and see which one you like best.

Better yet I have not looked up the Cancer place to donate yet locally but I could just order up the Sharp Memory Display from Adafruit and the 128x128 pixel display from Mouser and have them shipped out to you. I’ll just need an address to send them and consider it done. When the 2.7 inch screens are back instock I’ll send you one of those also. Up to you, just let me know.

I have loaded about 3 different fonts up now. Super easy to do! I’m just loading them into the Test Font area. Everything is looking good. Sweet!

I think many people will get good use out of your work. I will create a screen capture video explaining and showing exactly how to do the font creation process for others to view.

The Teensy 3.1 has 4 times the SRAM as the 3.0 if you didn’t know already, that makes it perfect for the screens and storing tons of fonts or Bitmap data.

1 Like

@peekay123 Been loading tons of fonts just to see which ones look best large.

The hardest part of loading new fonts is having to delete all the data after comma, the // A stuff for each character in the font descriptor lines. I had been doing it by just deleting each line one by one.

Then I figured there had to be a better more efficient way of deleting all that data at the same time. So I copied the Text Descriptor data from TheFontFactory and then pasted it into Excel and that will seperate the data for you and then you can just copy the column with the number data that you need and forget the rest. Speeds things up many times over deleting the text line by line.

Here are few fonts I tried just playing around. Exported fonts at about 22 point size.

1 Like

Just like a kid in a candy shop! :smiley: