XarkLabs / PDQ_GFX_Libs

Optimized fork of Adafruit's GFX library (and drivers) for Arduino (AVR).
113 stars 37 forks source link

How to use the library #19

Closed ajax5692 closed 5 years ago

ajax5692 commented 5 years ago

Hi, I am new to Arduino and have a 1.8inch TFT LCD. I want to use the PDQ library, but I'm not able to install it somehow. Can someone please help me out? Mine has an LCD driver ST7735.

mrt-prodz commented 5 years ago

It depends on which IDE you are using, if you are using the Arduino IDE as far as I can remember you should have an Arduino folder in your Documents (or home directory on Linux) and you should simply copy the folders PDQ_GFX and PDQ_ST7735 in there.

You should also copy PDQ_ST7735_config.h in your main project folder and edit it accordingly if necessary.

After that you can include the library and configuration file in your .ino project file :

#include <PDQ_GFX.h>
#include "PDQ_ST7735_config.h"
#include <PDQ_ST7735.h>

Try to compile and run the example provided for the ST7735 first (in examples folder PDQ_graphicstest), once it's working you know you have set the environment properly to run or make any other project using this library.

ajax5692 commented 5 years ago

Thanks for the response. It works really well now!

coderatchance commented 1 year ago

Hello!

Thanks for sharing info how to get going with the PDQ_ST7735... I have tried the above on Arduino IDE 1.8.13 and it does not compile...

I am on AT Tiny3216 and TFT SPI display with the ST7735s driver ...

1st I am missing the #include "PDQ_ST7735_config.h" For example, where can this file be found? 2nd if this uncommented, then error :

#if !defined(ST7735_CHIPSET) || !defined(ST7735_CS_PIN) || !defined(ST7735_DC_PIN)
#error Oops!  You need to #include "PDQ_ST7735_config.h" (modified with your pin configuration and options) from your sketch before #include "PDQ_ST7735.h".
#endif

Thanks in advance for any help!

Best.

XarkLabs commented 1 year ago

Hello,

It looks like all the examples were not tested for all devices (sorry).

However, the missing file mostly just defines the pins you are using to control the display.

So it looks like this file: https://github.com/XarkLabs/PDQ_GFX_Libs/blob/master/PDQ_ST7735/examples/PDQ_GFX_Button_test/PDQ_ILI9341_config.h

Can be replaced with: https://github.com/XarkLabs/PDQ_GFX_Libs/blob/master/PDQ_ST7735/examples/PDQ_graphicstest/PDQ_ST7735_config.h

(And check that the pins inside match your project).

Take it easy, Xark

On Jun 8, 2023, at 2:30 AM, UFighter @.***> wrote:

Hello!

Thanks for sharing info how to get going with the PDQ_ST7735... I have tried the above on Arduino IDE 1.8.13 and it does not compile...

I am on AT Tiny3216 and TFT SPI display with the ST7735s driver ...

1st I am missing the #include "PDQ_ST7735_config.h" For example, where can this file be found? 2nd if this uncommented, then error :

if !defined(ST7735_CHIPSET) || !defined(ST7735_CS_PIN) || !defined(ST7735_DC_PIN)

error Oops! You need to #include "PDQ_ST7735_config.h" (modified with your pin configuration and options) from your sketch before #include "PDQ_ST7735.h".

endif

Thanks in advance for any help!

Best.

— Reply to this email directly, view it on GitHub https://github.com/XarkLabs/PDQ_GFX_Libs/issues/19#issuecomment-1582217951, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACEE35EHINFIOYJ22ZCXQWLXKGLVHANCNFSM4HMJ3VWA. You are receiving this because you are subscribed to this thread.