Digole 320 * 240 uart / spi / i2c touchscreen with 16Mb flash module with photon not working properly

I am using peekay’s digolegeo library, it compiles and works to a degree with uart but not with hard or soft spi. In uart it displays but does not respond to set rotation commands eg setRot90(); , which I was hoping would make it landscape.
For text it displays anything in the setup ok but in the loop also displays the digole command as a prefix and will not clear the screen.
Initially I could not get the spi versions to compile until changing the code with reference to this:
enter link description here
It compiles but only draws one box which is overlaid on the digole splash screen.
Has anybody got the SD card and touch working with one of these, either on the spark or the photon and if so with uart or spi?
My display is the 16Mb flash module version :sunglasses:.

@bevangg, you may be using an older library which doesn’t have the changes they made for the larger displays. I haven’t had a chance to do the updates as of yet.

BTW, can you post the link to the library you are trying to use?

Hi Paul thanks for the lightning fast response. I am using the GitHub lib:
as previously mentioned I have had to modify a couple of things to get it to compile for the photon

Sorry everybody, regarding the spi issue that is probably me being stupid as usual. I have not put jumpers on the spi / i2c pads. I will do so tomorrow and report back.

having soldered the jumpers I have found that hard spi does not work at all well unless modified as per bpr’s advice in this thread:
enter link description here
Without the extra delays the display is not clearing or completing shapes.
Even with these modifications the screen does not seem to want to display on the full display area.

Here is the modified section of digolegeo.h in case it is of any use to anybody

#if defined(_Digole_Serial_SPI_)		//Hardware SPI
DigoleSerialDisp(uint8_t pinSS) {
    _Comdelay = 10;
    _SS = pinSS;

void begin(void) {
    //pinMode(_SS, OUTPUT);
    //digitalWrite(_SS, HIGH);

void end(void) {
    pinMode(_SS, INPUT);

size_t write(uint8_t value) {
   pinResetFast(_SS);	//Low
    pinSetFast(_SS); //High
    return 1;

I am now trying with the timb digoleserialdisp library, also from GitHub, to see what that does.

@bevangg, did you change the display size values in this section of the digolegeo.h file:

> // Set display width and height in pixels - common Digole display sizes are (HxW): 128x64, 160x128, 96x64
> #define DISP_W  160  //screen width in pixels
> #define DISP_H  128  //screen Hight in pixels

to your display’s dimensions?

1 Like

Yes, I set it to the dimensions of my screen ie 240 * 320 as it defaults to portrait. It does not make any difference whether it is in hard / soft spi or uart, it does the same thing. If I try to draw a filled rounded rectangle of the screen dimensions it initially draws in the top 6th and then seems to display the rest top down if that makes any sense. It does, however, fill the screen with text so appears to respond to the size definitions. Here is a photo of it running the digolegeo example:

@bevangg, the Digole library you are using does not support the 2-byte pixel position format required by the displays. I have not yet had a chance to update the primitives extensions I wrote women time ago. I do plan on doing that soon though.

Thanks for that explanation. Makes total sense when you understand why.
Any idea why it is prefixing text with the digole commands?

re digole prefixes: just been looking at the latest mbed digole library and do not want to jump to conclusions so will have another look tomorrow and report back if I find anything of interest

1 Like

@peekay123, did you ever tackle the larger digole touch screens that require 2 byte addressing?

@bpr, I have but haven’t tested it completely and I haven’t finished porting the extra graphic primitive functions.

@peekay123. Looking forward to seeing it. Thanks for your work! I got hopelessly lost with it …

Have you gotten it to work yet

@skradaroman, you can find the working library here! :wink:

@peekay123, thank you for the quick response!

1 Like