RA8875 Library functions

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
mboroff
 
Posts: 96
Joined: Sat Feb 22, 2014 7:45 pm

RA8875 Library functions

Post by mboroff »

OK I admit to plagiarism in that I often cut and paste code from your examples into code for my own projects. Of course it is strictly for my own use and I don't publish.

Anyway, I purchased the 5" TFT Touch display, the RA8875 controller and the STMPE610. I've written a tic tac toe game and graphical dice for it. I wanted to display some bit maps using the display bitmap routine from the tft library but it appears that the RA8875 cpp and h are missing the setAddrWindow and pushColors functions. C++ has never been my forte and adding them in to your library is a 50/50 proposition. If it works, when you issue an update it might wipe out my changes. If it doesn't work, I probably won't be able to figure out how to make it work. I get most confused on the bit conversions.

So could you pass on a request to update the RA8875 library to work with a display bitmap function or and example of one or even display jpg files.

And if your interested I could upload my dice and tic tac code or my clock code that displays weather info and plays Westminister chimes or sample music using the vs1053 and 2.8 amp and 2.8 breakout display and dth22.

Thanks

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: RA8875 Library functions

Post by adafruit_support_rick »

Thanks - I'll pass along the request!

User avatar
mboroff
 
Posts: 96
Joined: Sat Feb 22, 2014 7:45 pm

Re: RA8875 Library functions

Post by mboroff »

Well I must say burning the midnight oil I was able to fix the drawBmp routine without out changes to the library. I 1) commented out the tft.setAddrWindow(x, y, x+w-1, y+h-1); which is not needed. 2) I converted the color(565) from the tft.cpp to a function call. And 3) I converted the tft.pushColors(lcdbuffer, lcdidx, first); to a drawPixel.

In the attached sketch I am using an Ethernet card for the SD reader and I have wired my digital pins to the 2X bank on a Mega2560.

Feel free to put the pin assignments back to lower digits and add the example to the RA8875 library. It is your code with a hack.
Attachments
RA8875_bmp_V2.txt
(8.27 KiB) Downloaded 312 times

User avatar
mboroff
 
Posts: 96
Joined: Sat Feb 22, 2014 7:45 pm

Re: RA8875 Library functions

Post by mboroff »

make that

tft.drawPixel(x + col, y + row, lcdbuffer[lcdidx]);

Adjustment for setting where to display the bmp.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: RA8875 Library functions

Post by adafruit_support_rick »

Thanks! I'll put it on the to-do list...

User avatar
local_dani_21
 
Posts: 128
Joined: Sun Apr 19, 2009 3:10 pm

Re: RA8875 Library functions

Post by local_dani_21 »

Hi adafruit

I just ordered one of your 5" TFT's and a controller board with the RA8875. Has that RA8875-library been updated to display BMP's or is it still in the pipeline?

Thank you, Dani

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: RA8875 Library functions

Post by adafruit_support_rick »

Still in the queue, sorry. You can check out mboroff's code he posted.

User avatar
local_dani_21
 
Posts: 128
Joined: Sun Apr 19, 2009 3:10 pm

Re: RA8875 Library functions

Post by local_dani_21 »

Thanks for your quick reply! I'm in the process of evaluating displays for an installation with 8 displays and I would like to be sure that I only invest in displays that will be able to display images. Is there a chance that the library will be fixed within the next few weeks? Or should I rather buy your smaller (3.5") ones instead of the bigger (5") ones?

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: RA8875 Library functions

Post by adafruit_support_rick »

I'll try to get to it this weekend.

User avatar
local_dani_21
 
Posts: 128
Joined: Sun Apr 19, 2009 3:10 pm

Re: RA8875 Library functions

Post by local_dani_21 »

Wow, that is so cool. Thank you very much!

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: RA8875 Library functions

Post by adafruit_support_rick »

I've added mboroff's bitmap example to the library's example sketches.

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”