VGA output - some examples

All about the VGA for the ESP32-S3
User avatar
Electroguard
Posts: 860
Joined: Mon Feb 08, 2021 6:22 pm
Has thanked: 276 times
Been thanked: 323 times

Re: VGA output - some examples

Post by Electroguard »

Some suggestions at the bottom to check out your situation, but it does work amazingly for me.
I have in img2 folder containing over 100 different size flower jpg's which each have their pixel height added into their filename.
The script counts the number of files in that folder when it starts up, but doesn't store any of the filenames.
Every 12 minutes a new random number gets selected and the scripts skips down to the appropriate nth file, then extracts the height number from the filename so it can be subtracted from the screen height so that all pics always display correctly at bottom right using x=10, y=470-height... and it just keeps on working

vga.image "/img2/"+pic$, 10,470-yh
vga.show


Which doesn't help you, but at least lets you know that it does work.
All I can say about your situation is what I would do in similar circumstances.

Firstly your line 1 suggests we are using the same version Annex32-S3 CAN DMT VGA 1.51.1 qio opi LFS
But why is line 1 not showing as a comment ?

Check that someone elses script does not still contain someone elses configuration settings, so check that the specified pinouts are actually correct for you by drawing a white circle or box on the screen... if it shows up as white then all the pins are obviously correct.
Set x and y coordinates to something positive like 10,10
Use File Manager tab to go into the specified folder to view an image file that is in there.
Then be sure there is no syntax difference in the scripts specified /path/filename
User avatar
Fernando Perez
Posts: 378
Joined: Mon Feb 15, 2021 10:09 pm
Location: Santander (Spain)
Has thanked: 195 times
Been thanked: 267 times

Re: VGA output - some examples

Post by Fernando Perez »

Regarding why the image does not appear in your program, and assuming that your montage works correctly (as can be seen in your photos), it occurs to me that perhaps you have not placed the image in a subfolder called img, but that it is in the same directory of your program. If so, change your line to vga.image "car1.bmp". I have also removed the x,y parameters since in this case they are not necessary, since the image is 640x480 and takes up the entire screen.
In any case, do not expect wonders, the resolution of 640x480 and, above all, the limitation of colors, give images on the screens that are quite poor in terms of quality.
I am attaching an adapted code to view multiple images in a carousel. If none appear and not even the initial text message, other error possibilities will have to be analyzed.

Code: [Local Link Removed for Guests]

' Annex32-S3 CAN DMT VGA 1.51.1 qio opi LFS
'VGA.PINOUT R0, R1, R2, G0, G1, G2, B0, B1, HSYNC, VSYNC
vga.pinout 14,13,12,3,8,18,6,5, 4,9
vga.delete
vga.init 2 ' VGA 640x480
vga.fill black
vga.text.size 4
vga.text.draw "DEMO IMAGES", 350, 250
vga.show
pause 5000

carousel:
vga.image "/img/car1.bmp"
vga.show
pause 5000

vga.image "/img/casita.jpg"
vga.show
pause 5000

goto carousel
(To shock the purists, I used a GOTO, which is something like summoning the devil) :lol: :twisted:
You do not have the required permissions to view the files attached to this post.
User avatar
Electroguard
Posts: 860
Joined: Mon Feb 08, 2021 6:22 pm
Has thanked: 276 times
Been thanked: 323 times

Re: VGA output - some examples

Post by Electroguard »

(To shock the purists, I used a GOTO, which is something like summoning the devil)
Good man !
I include GOTO in my scripts as standard now, because they allow quick and easy insertion of test code without needing to affect the original.

Code: [Local Link Removed for Guests]

 
'EZ9ac  - by Electroguard - developed on Annex 1.51.1
'CET-1CEST,M3.5.0,M10.5.0/3
goto start
'put test code area
end

start:
title$ = "EasyNet Weather 9a "    
nodename$  = "Weather"                          'Assign a unique node name of your choice (if you forget, it will be called "Node" + its node IP)
RonS
Posts: 115
Joined: Thu Mar 02, 2023 10:15 pm
Location: germany
Has thanked: 64 times
Been thanked: 23 times

Re: VGA output - some examples

Post by RonS »

OK - no success - I'll check the monitor

Of course, I have already tried some recommended setup configurations
DSCN0551.JPG
DSCN0550.JPG
DSCN0549.JPG
You do not have the required permissions to view the files attached to this post.
Modules : 3xESP32-Cam MB (Chip"DM ESP32 S" ),AI-Thinker Audio Kit (ES8388), ESP32 Dev Kit with Display
User avatar
Fernando Perez
Posts: 378
Joined: Mon Feb 15, 2021 10:09 pm
Location: Santander (Spain)
Has thanked: 195 times
Been thanked: 267 times

Re: VGA output - some examples

Post by Fernando Perez »

RonS, don't give up, I see that you have worked a lot designing, assembling and welding.
I see that now you do get images, but of very poor quality and with distorted colors.
And I note that you have run the 24-color demo program that I posted. In the photo of your screen with the 24 colors you can see that the color of the wallpaper is nothing like what I get on my monitors. And, important hint, the characters black, navy, maroon, etc. appear in blue instead of white, which is what they should be.
Items to check:
- The ESP32. In my program, eliminate the GOTO (which the devil loads them) and add between the vga.show and the pause of each image the instruction vga.save "/dump1.bmp" and vga.save "/dump2.bmp". Download the created images to your computer and check if they appear correctly.
- The connections. Check that there are no cold or bad solders and that each wire is actually connected where it should be.
- The resistances. In your case potentiometers. I don't quite understand why both Robin and you have had to resort to variable resistors instead of fixed ones. With the series/parallel value combinations that I published at [Local Link Removed for Guests] I have not had any problems. What's more, by entering the manual settings of my monitors and playing with the Brightness, Contrast, Temperature and Gamma values, I have been able to obtain a very pure white color, unlike what is happening to you and what happened to Robin at principle. But it is clear that the problem is in the color blue.
- The wire. Check with a tester in the ohms position that you have not exchanged any cables and that each pin of the connector has a good connection with the corresponding end of the cable.
- The monitor. Connect another source (computer) and check that it appears correctly.
I am afraid that most of these checks have already been done without result, but I insist that the problem must be in the synthesis of the blue color.
User avatar
cicciocb
Site Admin
Posts: 2060
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 439 times
Been thanked: 1358 times
Contact:

Re: VGA output - some examples

Post by cicciocb »

Ron,
you should set the potentiometers as per the value I published and take care of the order of the bits (probably you are using the bits in the wrong order).

The values can change a little bit depending on the monitor / module but you can always correct the colors with the monitor parameters.
User avatar
Electroguard
Posts: 860
Joined: Mon Feb 08, 2021 6:22 pm
Has thanked: 276 times
Been thanked: 323 times

Re: VGA output - some examples

Post by Electroguard »

Try this:
it is CiccioCB's color depth test example hacked to run on the later versions syntax.
If you get any errors (eg: missing fonts etc) just comment those lines out.

As you will see from my vga.pinout I am using the inline pins all on the same side (as in a previous pic), so obviously you should change to suit yours.
Importantly it will show if the colour shades are in the correct order ... ie: if the pin numbering is actually correct.
It could be significant, because the pin syntax is not intuitive, ie: the least important colour pin is specified first then the next most important, followed by the most important colour pin last ... so if they are listed the wrong way around, the colour blends will be wrong.

At the bottom is a screen dump showing how the colours looks for me... if the colour blend is not correct, nor will be the pictures

Code: [Local Link Removed for Guests]

vga.delete
vga.pinout 9,10,11, 12,13,14, 15,16, 17,18  'Inline
vga.init 2,1 '
vga.fill black
vga.rect 0,0,640,480,white
vga.show
tft.loadfont "/fonts/FreeMonoBold10pt7b.bin", 10
vga.text.color green, black
vga.text.size 1
vga.text.font 3
w = 640 : h = 480
y = 30
for c = 0 to 224 step 32
  vga.rect 0, y, 640, 20, tft.rgb(c,0, 0), 1
  y = y + 20
next c
for c = 0 to 224 step 32
  vga.rect 0, y, 640, 20, tft.rgb(0,c, 0), 1
  y = y + 20
next c
for c = 0 to 192 step 64
  vga.rect 0, y, 640, 20, tft.rgb(0,0, c), 1
  y = y + 20
next c
vga.show
end


sub create_color(n, c)
c = (n and 3) or ((n and &b11100) << 3) or  ((n and &b11100000) << 8)
end sub


colourblend.jpg
You do not have the required permissions to view the files attached to this post.
RonS
Posts: 115
Joined: Thu Mar 02, 2023 10:15 pm
Location: germany
Has thanked: 64 times
Been thanked: 23 times

Re: VGA output - some examples

Post by RonS »

Thanks to everyone - I'll report back when I've made progress
Modules : 3xESP32-Cam MB (Chip"DM ESP32 S" ),AI-Thinker Audio Kit (ES8388), ESP32 Dev Kit with Display
RonS
Posts: 115
Joined: Thu Mar 02, 2023 10:15 pm
Location: germany
Has thanked: 64 times
Been thanked: 23 times

Re: VGA output - some examples

Post by RonS »

Ok, I arranged the pins and checked the potentiometers and now it looks good...
It was my big mistake, but amazing that you hardly noticed it otherwise

One more question:
Will there also be a function like tft.camera(url$.......) for VGA output , in the future or where can I find the command ?

thanks again at all for your help
Ron
Modules : 3xESP32-Cam MB (Chip"DM ESP32 S" ),AI-Thinker Audio Kit (ES8388), ESP32 Dev Kit with Display
User avatar
cicciocb
Site Admin
Posts: 2060
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 439 times
Been thanked: 1358 times
Contact:

Re: VGA output - some examples

Post by cicciocb »

[Local Link Removed for Guests] wrote: [Local Link Removed for Guests]Sun Sep 17, 2023 8:20 am Ok, I arranged the pins and checked the potentiometers and now it looks good...
It was my big mistake, but amazing that you hardly noticed it otherwise

One more question:
Will there also be a function like tft.camera(url$.......) for VGA output , in the future or where can I find the command ?

thanks again at all for your help
Ron
So far, the camera is not supported
Post Reply