Digole
Digital Solutions
iDigole Buyer ProtectioniDigole Buyer
Protection
My shopping cart
0 Items:
Secure Checkout
Top Rated Plus
Visit Our Live Auctions
99.9% Customer's Satisfaction
 
Forum : Digole Serial Display : Color OLED module :

 Search Forum.. 
 Creat New Topic   Reply 

User Font Not Uploading

I am trying to upload user fonts but to no avail. Currently using an Arduino Due, Serial color OLED 160x128 and I2C.

Here is my code to try and upload freedom25n from u8glib:

 

#include <DigoleSerial.h>

#include <Wire.h>

DigoleSerialDisp mydisp(&Wire,'\x27');

const uint8_t userfont1[] ={

  0,18,26,0,0,24,3,112,3,144,32,127,0,26,0,24,

  0,0,0,0,11,0,0,255,255,255,255,255,255,255,255,255,

  255,17,16,48,19,1,6,1,192,0,1,192,0,1,192,0,

  1,192,0,1,192,0,1,192,0,1,192,0,255,255,128,255,

  255,128,1,192,0,1,192,0,1,192,0,1,192,0,1,192,

  0,1,192,0,1,192,0,7,8,8,11,3,2,62,62,62,

  62,62,240,240,240,9,2,4,11,1,13,255,128,255,128,5,

  5,5,11,5,2,248,248,248,248,248,255,17,24,72,19,1,

  2,255,255,128,255,255,128,192,3,128,192,3,128,192,3,128,

  192,3,128,192,3,128,192,3,128,192,3,128,192,3,128,192,

  3,128,192,3,128,192,3,128,192,3,128,192,3,128,192,3,

  128,192,3,128,192,3,128,192,3,128,192,3,128,192,3,128,

  255,255,128,255,255,128,255,255,128,6,24,24,19,7,2,252,

  252,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,

  28,28,28,28,28,28,28,17,24,72,19,1,2,255,255,128,

  255,255,128,0,3,128,0,3,128,0,3,128,0,3,128,0,

  3,128,0,3,128,0,3,128,0,3,128,0,3,128,255,255,

  128,255,255,128,192,0,0,192,0,0,192,0,0,192,0,0,

  192,0,0,192,0,0,192,0,0,192,0,0,255,255,128,255,

  255,128,255,255,128,17,24,72,19,1,2,255,255,128,255,255,

  128,0,3,128,0,3,128,0,3,128,0,3,128,0,3,128,

  0,3,128,0,3,128,0,3,128,0,3,128,31,255,128,31,

  255,128,0,3,128,0,3,128,0,3,128,0,3,128,0,3,

  128,0,3,128,0,3,128,0,3,128,255,255,128,255,255,128,

  255,255,128,17,24,72,19,1,2,192,3,128,192,3,128,192,

  3,128,192,3,128,192,3,128,192,3,128,192,3,128,192,3,

  128,192,3,128,192,3,128,192,3,128,255,255,128,255,255,128,

  0,3,128,0,3,128,0,3,128,0,3,128,0,3,128,0,

  3,128,0,3,128,0,3,128,0,3,128,0,3,128,0,3,

  128,17,24,72,19,1,2,255,255,128,255,255,128,192,0,0,

  192,0,0,192,0,0,192,0,0,192,0,0,192,0,0,192,

  0,0,192,0,0,192,0,0,255,255,128,255,255,128,0,3,

  128,0,3,128,0,3,128,0,3,128,0,3,128,0,3,128,

  0,3,128,0,3,128,255,255,128,255,255,128,255,255,128,17,

  24,72,19,1,2,255,255,128,255,255,128,192,0,0,192,0,

  0,192,0,0,192,0,0,192,0,0,192,0,0,192,0,0,

  192,0,0,192,0,0,255,255,128,255,255,128,192,3,128,192,

  3,128,192,3,128,192,3,128,192,3,128,192,3,128,192,3,

  128,192,3,128,255,255,128,255,255,128,255,255,128,16,24,48,

  19,2,2,255,255,255,255,0,7,0,7,0,7,0,7,0,

  7,0,7,0,7,0,7,0,7,0,7,0,7,0,7,0,

  7,0,7,0,7,0,7,0,7,0,7,0,7,0,7,0,

  7,0,7,17,24,72,19,1,2,255,255,128,255,255,128,192,

  3,128,192,3,128,192,3,128,192,3,128,192,3,128,192,3,

  128,192,3,128,192,3,128,192,3,128,255,255,128,255,255,128,

  192,3,128,192,3,128,192,3,128,192,3,128,192,3,128,192,

  3,128,192,3,128,192,3,128,255,255,128,255,255,128,255,255,

  128,17,24,72,19,1,2,255,255,128,255,255,128,192,3,128,

  192,3,128,192,3,128,192,3,128,192,3,128,192,3,128,192,

  3,128,192,3,128,192,3,128,255,255,128,255,255,128,0,3,

  128,0,3,128,0,3,128,0,3,128,0,3,128,0,3,128,

  0,3,128,0,3,128,255,255,128,255,255,128,255,255,128,5,

  16,16,11,5,2,248,248,248,248,248,0,0,0,0,0,0,

  248,248,248,248,248,7,16,16,11,3,2,62,62,62,62,62,

  0,0,0,62,62,62,62,62,240,240,240,255,255,255,255,255,

  255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,

  255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,

  255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,

  255,255,255,255,255,255,255,255,255,255,255,255,255,255,255};

void setup() {

  mydisp.begin();

  mydisp.clearScreen();

  delay(500);            

  mydisp.uploadUserFont(sizeof(userfont1),userfont1,1);

  delay(500);

  mydisp.clearScreen();

  mydisp.setFont(200);

  mydisp.print("1234567890");

}

void loop() {}

 

What am I doing wrong? The uploads reports as being succesful but it remains blank when trying to print this font... I suppose it actually did not upload but didn't return any error?

Also, it seems to me that there is a discrepancy between the PDF documentation and the library. 

The PDF reads:

SUFBBBB... Set User Font, 1st B is section of memory you want to upload, 2nd B is the higher byte of data length, following by data

The library shows: 

     write(sect);

    write((uint8_t) (lon % 256));

    write((uint8_t)(lon / 256));

 ...data

Also the Arduino lib function example in the PDF appears to be wrong (outdated maybe) as it does not use the parameters in the right order.

Thanks
 

RE:User Font Not Uploading

 OK, it works. For reference, I followed the information in this post. Basically, you need to make sure that the display is ready to upload. The PIC upload message somewhat indicates if it is working or not.

Copyright Digole Digital Solutions, 2008-2017. All rights reserved.
Powered by Victor Sun