Sharp Memory Display + SparkCore

@Dogan, the Core does not have enough RAM to support the display buffer required for the Sharp Mem display driver. I wrote a special driver to make use of SPI FRAM to act as a display buffer but it requires a 32K byte FRAM. The Photon will have enough RAM to support the larger display without problems.

As for power, if you read above, you will find data on the display power consumption. As for the Core/Photon, you will need to make extensive use of deep sleep modes to get “months” of battery time. :smile:

When is Photon sample available? Is there are extra memory add hack to Spark Core just to test my concept with Spark Core till Photon arrives? I am tasked to have a working proto type 4.4" Display with Spark/Photon to wirelessly change screen content over WiFi and Internet.

Shipping of the photon starts at the end of March, according to @zach

@Dogan, there is no “hack” to add more memory. However, as I mentioned before, you CAN add a FRAM (16K bytes) module to test your code with the only thing being affected is the display refresh rate. When the Photon comes out, you simply put the “regulare” Shap Mem library and use onboard memory as the buffer (9600 bytes).

Has or can Zach make a pre-run functional Photons vailable?

Has anyone actually used Spark Core + FRAM to push content to 4.4" Sharp Memory LCD over WiFi and Internet without using a Development Board. I also need to estimate the footprint to deal with existing housing limitations.

@Dogan, I used the 2.7" display with FRAM to develop the library. That display is 400x240 and uses a 12KB display buffer in FRAM. I used this Adafruit 32K byte FRAM breakout, a Core and a protoboard for testing. @kennethlimcp created an SD/FRAM shield but I am not sure he is selling them anymore. Besides a different library, the FRAM configuration requires a minor change to the way the display MOSI line is wired to the Core/FRAM. The library is here on my repo.

1 Like

Is it possible to display a bitmap image with the Spark or is that really pushing the RAM?
It seems most of these replies revolve around displaying the custom font bitmap, can we display bitmaps just the same using TheDotFactory?

@robertcedwards, what size display and bitmaps are you considering?

It’s a 96x96 display…I suppose our bitmap would be the same size.
I just haven’t since an example with the Spark and we’ve failed at our attempts to make it work with your examples by adding our custom bitmap.

@robertcedwards, defining a bitmap with the mfGFX library is straight forward but needs to be in the correct format. What have you tried?

@peekay123
I’ve tried

const unsigned char image[] = 

with

  display.drawBitmap(0,0,image,96,96,0);

I used a converted bitmap from this tool but still have trouble compiling.
I’ll use TheDotFactory to generate a new converted bitmap once I get home to a PC.
Could the converter be causing the problem?
Thanks for your help!

@robertcedwards, the tool link is not working. I will look into the bitmap format required but it should be pretty straight forward. :smile:

@peekay123 :ok_hand: Awesome, thanks.
That link is moot, as it’s an older PC tool with fewer capabilities than The Dot Factory.
I converted a bitmap with The Dot Factory using the font settings but I’m getting compiling errors.
Let me know what you find out regarding format, thanks much!

@robertcedwards, so the format for the monochrome bitmap is pretty straight forward:

line1:   byte1, byte2, byte3...
line2:   byte1, byte2, byte3...
...

Each line is drawn in order byte1, byte2, etc. The bytes are drawn MSB first. So for a 96x96 display, that would be 96/8 (pixels wide) * 96 (lines high) = 1152 bytes per image.

I have not tried it but you might be able to use the Digole image converter with the “black/white for all draw image function” setting to convert an image file to the format you can you in your code.

1 Like

@peekay123 Thanks for the link and info.
I was able to generate a hex value using an image, seems to be in the correct format.
What type of variable do we need to use for the array? We’ve tried:

static const image[] = {};

&

const uint8_t image[] = {};

&

const unsigned char image[] = {};

All with no luck compiling.

then we’re calling it with:

display.drawBitmap(0,0,image,96,96,0);

We’ve (@dplumly & I) have been having compilation errors getting this, or other example arrays that were similarly formatted for a 96x96 array.

Thanks for all your help with this and many other Spark issues, you’re the man! :fist:

Not to rob @peekay123 the chance to directly answer, but could you supply the error message.

The second and third version should be OK (as long the image is provided between { and } and you might need casting - hence the call for the error message :wink: ), but number one is missing a valid variable type.

Looking at the declaration of drawBitmap()

drawBitmap(int16_t x, int16_t y, const uint8_t *bitmap, int16_t w, int16_t h, uint16_t color),

I’d go for your number two.

1 Like

@ScruffR is just showing off as usual (though he is correct) :unamused:

Our telepathic abilities are not as good as we hoped so sharing the error messages would be good :smirk:

2 Likes

Ok here’s the tail end of the error messaging that seems relevant:

/spark/compile_service/shared/workspace/3_compile-server2/core-firmware/build/dustins-display.cpp:203: undefined reference to `Adafruit_GFX::drawBitmap(short, short, unsigned char const*, short, short, unsigned short)' collect2: error: ld returned 1 exit status make: *** [0114a4810504fd066ea742d9c344561660740fe564848dd091e29f019fbd.elf] Error 1

@peekay & @ScruffR you both rock! Thanks…

I see you’re not using Paul’s library sporting his Adafruit_mfGFX - where I got the declaration of drawBitmap() from.

Which lib are you using?

1 Like

@ScruffR
Oh my, I had pasted the Sharp memory library into my Adafruit_GFX library tab.
Let me fix and recompile…