Go Down

Topic: Hellp for MCUFRIEND (Read 604 times) previous topic - next topic

elite911

May 03, 2020, 01:25 pm Last Edit: May 03, 2020, 02:32 pm by elite911
HELLO, i am a NOOB in arduino, sorry for my bad english. I wanted to make an aquarium controller, got the controller code and bought everything I needed. I ordered you wrong lcd. In the project used lcd, and I bought the lcd shield MCUFRIEND. So I was wondering if someone could help me revise the code and customize it for my lcd. The code from the project is below

Thanks everyone

edit: this is video of controllor
https://www.youtube.com/watch?v=6wCHI6fy76g&t=98s

david_prentice

This project is intended for a BIG five inch display.   As shown in the video.  i.e. SSD1963 with 800x480 pixels.

These displays require a 40-pin Adapter Shield for Mega2560.

Buy all the same components.
Install the same libraries.

The project should be fine.

David.

elite911

#2
May 04, 2020, 07:49 pm Last Edit: May 04, 2020, 07:49 pm by elite911
Sorry sorry sorry
  i accidentally replaced the code, this is the proper code i was thinking to post

and link
https://www.plantedtank.net/forums/20-diy/677265-iaqua-my-touch-interface-aquarium-controller-arduino.html

david_prentice

The link and code in #2 is for a 240x320 display.   It uses UTFT style libraries.

I suggest that you buy any 240x320 UTFT compatible display.   Then the software will work easily.
What controller is on the shield that you have bought?
UTFT only supports a few 8-bit displays.
UTouch only supports XPT2046 Touch Controllers

It would be quite a bit of work to run with MCUFRIEND_kbv.

David.

elite911

yes the code is for a controller with a 3.2 "lcd 240x320 and i bought a 3.5" 480x320. Because I thought it wasn't a problem to change the resolution.
this is the specification of my screen


Product Parameters
 
Name Parameter
Display Color RGB 65K color
Screen Size  3.5(inch)
Type TFT
Driver IC ILI9486
Resolution 480*320 (Pixel)
Module Interface 8-bit parallel interface
Active Area  73.44*48.96(mm)
Module PCB Size 85.49*55.63(mm)
Operating Temperature -20℃~70℃
Storage Temperature -40℃~70℃
Operating Voltage 5V/3.3V
Power Consumption TBD


i would buy a suitable lcd but in my country we have a problem with shipments from outside. Due to COVID-19 I have been waiting for some parts for more than two and a half months. So i wanted to try adapting to this lcd.

david_prentice

Your project has several sensors, relays, ... to connect to the MEGA2560.   Some wiring might need to be changed.

Most importantly,  the TFT is not supported by UTFT library.
The Touch Panel is not supported by UTouch library.

It would require a lot of knowledge to adapt the program software.
And a fair bit of knowledge to change the wiring.

I suggest that you buy the recommended parts.
Which means a 240x320 screen with Adapter Shield for Mega2560.
The SSD1289 screen is probably not available but there is an ILI9341 screen with the same shape and pinout.

Of course someone might have modified the project for different hardware already.
Ask on "Fish" forums.   Or just Google.

What country do you live in?

David.

elite911

Then I'll give up on this.

Do you know any software that will make it easier for me to create a GUI that will work on MCUFRIEND lcd? Whichever I've tried so far none have worked.

I'm from Croatia

david_prentice

There is nothing special about MCUFRIEND_kbv.   It is just a hardware library that inherits from Adafruit_GFX.    Just like many other hardware libraries e.g. Adafruit_ILI9341

Creating a GUI is not trivial.
I would advise using an existing one e.g. GUISlice

Regarding the Aquarium project.   It is not impossible.   It is pretty easy to add an ILI9486_8 model to UTFT.   (currently UTFT only supports 16-bit parallel for ILI9486)
All the "UTouch" calls would need to be changed to suit TouchScreen.h style methods.

It depends on your knowledge and experience.
Most "fish" enthusiasts would just want to assemble the components,  program the firmware and go.

David.

elite911

#8
May 08, 2020, 12:05 pm Last Edit: May 08, 2020, 12:06 pm by elite911
Of course a problem with the GUIslice, and if I just put one text on the screen and try to set it to arduino, it throws me an error. The error text is below and "try code". Can you tell me where I'm wrong???

Impulsive

Hi elite911! Sorry for the delay; I haven't been able to check the forum as frequently and overlooked your post.

The crash that you are seeing in the Arduino IDE appears to be due to a known issue in the older version of the Arduino IDE you are using. Please update your IDE to 1.8.12 to see if the compilation proceeds differently.

Also, it looks like you may have added a number of extra includes to your GUIslice sketch (pokusaj.ino). Most of these can probably be deleted as the GUI should be able to take care of that for you.

To David's point, it will be much easier to adapt the Aquarium project (looks great BTW!) if you can match the hardware to the project code, but I understand the challenge you may have with accessing parts. Looking at the project code that you linked to, the iAqua GUI (using UTFT) is heavily integrated with the program operation, so it may be a lot of work to port :o (As you mentioned in your first post that you are relatively new to Arduino, this may be a big task).

Nonetheless, if you are still interested in creating your own, I suggest updating your version of GUIslice (from the repository directly https://github.com/ImpulseAdventure/GUIslice ) as your version (0.13.0) is quite old and there are a couple important fixes in GitHub that aren't available in the Arduino Library Manager yet.

As usual, the first step should be to confirm that you can successfully run the mcufriend_kbv examples (eg. graphicstest_kbv) with your current display. It wasn't clear to me what touch controller is associated with your display, so we would want to confirm what touch libraries work properly with your display too.

good luck!
Arduino GUI - https://github.com/ImpulseAdventure/GUIslice

Go Up