I like to display an image on a 2.4" mcufriend TFT display .( b&w worldmap )
I don't have a SD-card ( I ordered some but it take 3to4 weeks )
Question :
Can I display a bitmap on yhe whole schreen without using a SD-card.
As the internet is a jungle ( I'm always looking at the wrong place ) can someone help me with a tutorial ( internet adresses - pdf ) how to use without SD card.
What's the maximum size of the bitmap without SD card. ( X by Y and KB )
Could be all silly questions but after spending houres on the net I'm still as stupide as before .( did not found the info )
OK David , thanks for all the info .
It's much clearer now for me .
I will not avoid a SD card but I don't have one for the moment . They are ordered but I have to wait for them.
Yes , I have a french amateur licence (F8VOA ). I'm amateur radio user and builder since 1979 and have German ( DA4BE and Belgian ON8GO licences ).
A last question ,
how quick can a bipmap image response ?
I mean , I will use it as back-ground image for a rotator controller .
The image must remain clear as the needle turns around .
The needle of the rotator needs abt one minute for a whole 360° and will change every 10° of position.
So I have to update every 1.667 seconds the image .
I wonder if the TFT is quick enough for this use .
Yes you can use a background image. You have to redraw the background as you move the "needle".
If you make sure to minimise the pixels drawn it can work smoothly. This requires careful design.
Redrawing a flat background colour is easy.
Redrawing a complex colour background photo is hard.
Please provide a real example. And with real dimensions. A 64x64 animated picture is easier than a 256x256 picture.
A very good year to you and all the readers .
I received finaly my SD-cards (Kingston 16G - formatted FAT32) and installed a .BMP file on it .
Then I tried to use the " showBMP_kbv_Uno sketch " on IDE 1.8.8 .
The SD is recognized so fr so good but no picture on the screen ( 2.4" MCU )
Only the blue screen from the 'fillScreen command '.
I receive following warning from the sketch in the void loop:
converting to non-pointer type 'int' from NULL [-Wconversion=NULL] if(f!=NULL){...
Any suggestions to this matter or for an other better sketch to try the BMP.
Copy the example BMP files from the extras/bitmaps directory to your SD card.
View the BMP files on your PC. You should see your own BMP file as well as my examples.
Then put the SD into the display socket and run the showBMP example sketch.
OK , David , thanks a lot ,
Now I have the bitmaps on mij screen .
I can see even my own bitmaps .
They are to great or to small , I have to adapt them but it's one step in the right direction .
I'll play a little bit with this tool and let know the results
Many thanks ,
Marco
The problem : I did not use the the samples ( in the extras ) but tried directly my own bitmap . It seems that not all the bitmap are usable for this .
I'm familar with IrfanView and will try a bitmap with that tool.I have a picture of a worldmap with my location in the middle and will use that.
Start a reply. Then press [Preview]. It offers Attachments. From memory it dies not like BMP. You have to ZIP it. Alternatively rename to an approved type.
my own bitmap I could not see , was my own mistake ( wrong extension )
On the other hand , I can not visualize betty_1 , betty_4 , marilyn , tiger240x317x4 and tiger178x160x4.
But that's no issue for me .
Attached the bitmap I will use for my antenna rotator project .
If you are familiar with , I rebuild a steering box for a HAM-IV CDE antenna rotator ( almost 40 years old device )
The BMP example can render different BMP formats. However some formats require some SRAM for the colour Palettes. Your Uno can render 2-colour, 16-colour Palettes but not 256-colour Palette. Edit the BMPDEPTH from 0 to 4 (16-colour)
I have attached a ZIP which contains your image in different formats. They should all display on the PC. You need more SRAM to show the world_235x240x8.bmp version.
Since your image has very few colours you should see no difference except for the monochrome version.
However, look at the file sizes. Your original 24-bit image with 262k colours is BIG.
You could embed the monochrome image in a Uno's Flash memory but it does not look as good as the colour images. You can store as many colour images as you want on an SD.
OK , that's clear .
I was playing around with the SD ( work like a USB-stick in som matter )
The world map shouldn't be 100% as I will use the map as a back-ground .
The only thing is that I need to adjust the map exactly in the middle of the tft screen . The center of the map ( that's my home - in amateur radio we called that QTH-locator - mine is JN12CW ) should be x,y zero point .
And ... I have to study the rules of SD-cards and bitmaps in order to write a simple sketch ( showing the map on TFT 2.4" and 3.5 " ).
Many thanks for all the help you gave me David , I learned a lot.
Hi David , I'm a liddle bit lost . I tried to adapt some sketches into a simple SD-card reading sketch but I don't have sufficient knowledge . Itried to find some instructions but without succes .
Do you know where to find a simple sketch which I can introduce in my own sketch . Better was : to find the info neaded to write it by my self - a hint here is mostly welcom.
OK , thanks , I started to strip your example but was lost in this . The problem with this methode is :
Every time after stipped some lines from the code , I rewrtite the code into the MEGA . But this methode is not working 100% . Even when I go to far in the stripping , the screen will continue working for a while . Then , at the end the sketch and screen stop working ( no more picture on the screen ) and it is impossible to find out at exactly what moment ( during the stripping ) it went wrong .
Post your code. Someone might show you where you have gone wrong.
Personally, I am happier with a printed listing.
I can sit down with a cup of tea and a pencil. It is easy to see which statements you can remove. A pencil is MUCH better than a pen.
This applies to any computer program that is difficult to follow.
I suspect that you use pencil and paper when designing your radio equipment.
You might draw a schematic and layout with CAD tools when you have made your main design decisions.