st7565 lcd draw string issues

EL Wire/Tape/Panels, LEDs, pixels and strips, LCDs and TFTs, etc products from Adafruit

Moderators: adafruit_support_bill, adafruit

st7565 lcd draw string issues

Postby bikeboy929 » Tue May 01, 2012 8:35 am

i am having trouble with the draw string function, when i load the example, the string doesn't show up


// draw the first ~120 characters in the font
testdrawchar();
glcd.display();
delay(2000);
glcd.clear();

// draw a string at location (0,0)
glcd.drawstring(0, 0, "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation");
glcd.display();
delay(8000);
glcd.clear();

it displays the chars, waits, and the shows a blank screen, waits, and then goes onto the next part.

i added a delay between glcd.clear and glcd.drawstring, and it worked fine (delayed 50), but now my own code

glcd.clear();
glcd.display();
delay(2000);
glcd.drawstring(8,3, "This is a string");
glcd.display();
delay(3000);

ends up showing "his is a string" on the screen, what ever i display loses the first letter of the string, any clue whats going on?

all the other functions i have used have worked properly
bikeboy929
 
Posts: 5
Joined: Wed Apr 18, 2012 11:55 am

Re: st7565 lcd draw string issues

Postby bikeboy929 » Tue May 01, 2012 9:09 am

well, i spent for ever on this last night, but it figures i post something, and 5 min later i get it to work.

anyway,

glcd.clear();
glcd.display();
delay(2000);
glcd.drawstring(0,0, "This is a string");
glcd.display();
delay(3000);

removes the T from the string,

glcd.clear();
glcd.display();
delay(2000);
glcd.clear();
delay(10);

glcd.drawstring(0,0, "This is a string");
glcd.display();
delay(3000);

works properly, i am guess you have to clear the buffer after ever glcd.display or else you get errors, even if u cleared it right before the display
bikeboy929
 
Posts: 5
Joined: Wed Apr 18, 2012 11:55 am


Return to Glowy things (LCD, LED, TFT, EL) purchased at Adafruit

Who is online

Users browsing this forum: Google [Bot] and 0 guests

Stuff to buy from the Adafruit store and links to product documentation!


New Products [102]

Raspberry Pi[80]
 
FLORA[23]
 
Bunnie Studios[9]
 
FPGA[1]
 
mbed[11]
Arduino[60]
 
NETduino[14]
 
BeagleBone[24]
 
Android[6]
 
XBee[10]
More Dev Boards[30]


 
BoArduino[8]
 
SpokePOV[4]
 
TV-B-Gone[4]
 
MiniPOV[3]
 
SIM reader[3]
 
Microtouch[5]
 
Clocks & Watches[18]
 
Drawdio[4]
 
Brain Machine[1]
 
Game of Life[2]
 
MintyBoost[2]
More DIY Kits[16]


 
MaKey MaKey[3]
 
Tweet-a-Watt[5]
 
Young Engineers[33]
 
Discover Electronics[2]
 
Snap Circuits[4]
 
littleBits[3]
 
Project packs[8]


 
Breakout Boards[33]
LCDs & Displays[48]
Components & Parts[69]
Batteries & Power[49]
EL Wire/Tape/Panel[52]
LEDs[109]
 
Wireless[14]
Cables[60]
 
Lasers[6]
Sensors/Parts[145]
 
Enclosures/Cases[11]
 
Solar[11]
 
RFID / NFC[13]
Prototyping[70]
 
iDevices[13]
Tools[71]
 
Wearables[39]
 
CNC[37]
 
Robotics[29]
 
3D printing[1]
 
Materials[24]


 
Stickers[41]
 
Skill badges[55]
 
Books[25]
 
Circuit Playground[7]
 
Gift Certificates[4]