Open manjeetparjapati opened 3 years ago
Can you provide more information of what isn't working please?
I have found problem, Its not in your code. let me explain for others. I am using Visual Studio Code and PlatformIO. I was using ST STM32 Platform and Bluepill F103C8 Board, In which code is giving me error [collect2.exe: error: ld returned 1 exit status]. I dont know the reason, after searching on Goggle I found lots of people having this error for different-different reasons in ST STM32 Platform. So I changed my board to ESP32 board (Platform- Espressif 32) and create a new project and then code working alright (some data type error came but I fixed it like uint_8 to char , size_t to short and calloc(1,sz) is void type )
Thanks for Library if possible could you please add some more features like Draw(Line rect, circle ), Scrolling, Buttons Interrupts functions etc Have a nice day
Hello I am using also platformIO. Can you @manjeetparjapati explain to me How add this library to my project please?
When I am gonna build, I took this error
if I am gonna use library just dgus.h
/*
*/
void _a_recv_handler(char *data, uint8_t cmd, uint8_t len, uint16_t addr, uint8_t bytelen) { dgus_set_page(12); }
uint8_t _serial_bytes_available() { return Serial2.available(); }
char _serial_recv_byte() { char c; c=Serial2.read(); return c; }
void _serial_send_data(char *data, size_t len) { Serial2.write(data,len); }
void setup() { // Note the format for setting a serial port is as follows: Serial2.begin(baud-rate, protocol, RX pin, TX pin); Serial.begin(115200); //Serial2.begin(9600, SERIAL_8N1, RXD2, TXD2); Serial2.begin(115200, SERIAL_8N1, RXD2, TXD2,true); Serial.println("Serial Txd is on pin: "+String(TX)); Serial.println("Serial Rxd is on pin: "+String(RX));
dgus_init(_serial_bytes_available, _serial_recv_byte, _serial_send_data, _a_recv_handler);
}
void loop() { //Choose Serial2 or Serial2 as required
}
Code:
void _a_recv_handler(char data, uint8_t cmd, uint8_t len, uint16_t addr, uint8_t bytelen) { if (addr == 0x1002 && (uint16_t)(uint16_t *)data == 0x03) { dgus_set_page(12); } }
uint8_t _serial_bytes_available() { return Serial1.available(); }
char _serial_recv_byte() { char c; c=Serial1.read(); return c; }
void _serial_send_data(char *data, size_t len) { Serial1.write(data,len); }
void setup() { Serial1.begin(BAUD);
dgus_init(_serial_bytes_available, _serial_recv_byte, _serial_send_data, _a_recv_handler); dgus_set_page(10); }
void loop() { }
Code finish here:
(some data type error came but I fixed it like uint_8 to char , size_t to short and calloc(1,sz) is void type )
If problem doesn't solve , let me know. I will send you working project (PlatformIO ESP32.)
Yes I have a got error this line code. When I do copy paste.
Maybe I made a mistake about inclue library. becaue I did just copy paste under include folder and I gave like this
Can you send me your working project please? @manjeetparjapati
@manjeetparjapati @mfatihkc Hi guys, has any of you succeeded with this? I'm going to try DWIN display with ESP32 (Platformio) so it would be nice to know if anyone before me has actually made success 😃
Hi master, i need help how to use this library's correctly?
@wramadhani70 For the record, I ended up writing the DWIN display manipulation library by myself ;-) I'm more than happy to share the code with you, if you want. I used it for DMG80480C070_04WTC.
Hi master, I will gladly accept it if you are willing to share the source code of using this library, it also makes me feel very helpful for learn this library and display,
@wramadhani70 It's not this library I used, I wrote my own. The code is here: https://github.com/litvinov-tabor2022/kiosk/tree/main/src/hw
Thank you so much Master, i will try it Master @jendakol,
HI, thanks for lib!. question: is it possible to draw an array of pixels(with different colors)? my task is to draw a dynamic image to the DWIN display.
Hi Thanks for lib, I really appreciate it. I want to use this lib in my Arduino Code. I have been working on that for last three days but no success. Please help me out
Code:
include
include
include
include
include
include
include
include "dgus.h"
include "dgus_lcd.c"
include "dgus_util.c"
define BAUD 115200
void _a_recv_handler(char data, uint8_t cmd, uint8_t len, uint16_t addr, uint8_t bytelen) { if (addr == 0x1002 && (uint16_t)(uint16_t *)data == 0x03) { dgus_set_page(12); } }
uint8_t _serial_bytes_available() { return Serial1.available(); }
char _serial_recv_byte() { char c; c=Serial1.read(); return c; }
void _serial_send_data(char *data, size_t len) { Serial1.write(data,len); }
void setup() { Serial1.begin(BAUD);
dgus_init(_serial_bytes_available, _serial_recv_byte, _serial_send_data, _a_recv_handler); dgus_set_page(10); }
void loop() { }
Code finish here:
I am using VS code (Platformio). After Build above code, received an error. collect2.exe: error: ld returned 1 exit status
some error also showed up like dgus_lcd.c:206:36: error: invalid conversion from 'uint8_t' {aka 'unsigned char'} to 'char*' [-fpermissive] but I resolved it by changing uint8_t to char
Waiting for your reply Again thanks for library code.