Hello,
I'm struggling around with following device:
I tried out many libraries, even utft doesn't work. (Driver must be in serial mode, tried out every one in the source code)
Voltage isn´t a problem because this device has an onboard converter for all pins.
Pin description is easy:
11PIN Standard wiring used IO:
VCC—Power supply (5V/3.3V)
GND-- Power supply (GND)
GND-- Power supply (GND)
NC—No connect
NC—No connect
LED-- Pick IO control back light off or PWM brightness control
CLK—SPI clock signal
SDI—Serial data input pin sda
RS—Command (RS=0)/ Parameter (RS=1)
RST—Reset pin
CS-- Chip selection pin
I can connect it (as shown on the product foto) directly to VCC,GND,A0-A5
A0 is only for the brightness.
Unfortunately there is no easy research for that display ( in serial mode)
I tried to contact the (friendly) seller, he only send me the same description for the display as on the product page (but in chinese )
Does anybody has a working code for this display or some hints?
Hello,
I dont know if I've modified my library, so I'll tell you the way how to find the pin mapping:
For some reasons they are hardcoded in the screen_4D_22_library.h file.
So my *.h file says: #define _4DSHIELD22_LCD_RESET A0 // Arduino Pin A0 #define _4DSHIELD22_LCD_RS 8 // Arduino Pin 8 - data or command #define _4DSHIELD22_LCD_CS 7 // Arduino Pin 7 - select #define _4DSHIELD22_LCD_Backlight 9 // Arduino Pin 9
#define _4DSHIELD22_TOUCH_YU A3 // Arduino Pin A3 - analog #define _4DSHIELD22_TOUCH_XR A4 // Arduino Pin A4 - analog #define _4DSHIELD22_TOUCH_YD A1 // Arduino Pin A1 - analog or digital #define _4DSHIELD22_TOUCH_XL A2 // Arduino Pin A2 - analog or digital
The last 4 lines you can forget for the moment, because our display has no touch screen.
So the configuration should be:
(left: display, right UNO)
CLK <—> SPI clock signal D13 (SCK)
SDI <—> Serial data input pin sda D11 (MOSI)
RS <—> D8 (Data/Command)
CS <—> D7 (chip select (SPI command))
LCD <—> D9 (Display backlight on/off, can be wired directly to 5v (better with 100R resistor!)
RST <—> A0 (Reset)
The library itself is a little bit overloaded in my opinion and hard to comprehensible.
I found another library, but didn't tested it out:
thank you for your post. Now it is working. But i have another question, how can i print data (reading form temp sensor) to the screen? I couldnt find the code comand for that.
Hello
thank you again. Works great, but i would like to ask you one more question. I have DHT22 sensor, and the reading i got are float , not integer. I did correcet my code to integer and it works. But pleas tell me how to get float numbers to the display?
void loop() {
int h = dht.readHumidity(); //i changed float to int!!!!
int t = dht.readTemperature(); //i changed float to int!!!!