Menu
JAQForum Ver 19.10.27

Forum Index : Microcontroller and PC projects : VGAclocks Designer

Posted: 05:00pm
14 Aug 2025
Copy link to clipboard
dddns
Guru

Hello :)

I have written an UI to build an analog clock with various elements. All the parameters can be setup with this, at the moment there are 5 designs which can be altered as you like. There are 3 sections for dimensions, colours and the clock hands. Every section can be saved to disk or the whole object as a snapshot.

Once you are finished it can be exported as a running basic program with an empty main loop, or only the DIM statements can be generated.

It runs on a 2350 in any resolution for MODE 1 and 2 and it runs in any MODE with resolution 1024 and above.
The program is too big and cannot be loaded from disk in Resolution 800 or 848.

Please test it and leave a comment what you think.





VGAcD.zip
 
Posted: 07:39pm
14 Aug 2025
Copy link to clipboard
PhenixRising
Guru

Well it's about time  

I'll show myself out.
 
Posted: 12:59pm
15 Aug 2025
Copy link to clipboard
dddns
Guru

To generate a runtime, a copy of "VGAcD.bas" needs to be on root of A: drive.

The extract will run on RP2040 with ILI9341 or with OPTION LCD320 ON on all others:




 
Posted: 03:00pm
15 Aug 2025
Copy link to clipboard
Amnesie
Guru

Hello

Impressive and very useful! Thank you for sharing this!

Greetings
Daniel
 
Posted: 08:32pm
15 Aug 2025
Copy link to clipboard
dddns
Guru

Nice to hear that you find it useful! :)

I've corrected a small issue and now the runtime contains some lines of demo code how to use it as a gauge:


edit:
I removed the old zip, this is the new one. Switching between Modes works now correct.
VGAcD.bas.zip
Edited 2025-08-16 09:46 by dddns
 
Posted: 12:06am
19 Aug 2025
Copy link to clipboard
dddns
Guru

Hello,

I have reworked and optimized it and now the scrolling is faster and very responsive.
One loop takes about 100ms so the cursor will move 10 rows per second.
Except that few values can get out of bounds it runs error free for me so far, please test it.
VGAcD.bas.zip
 
Posted: 02:09pm
25 Aug 2025
Copy link to clipboard
dddns
Guru

Hello :)

I have written the routines for:
- adding a corner to a hand. Corner is inserted below the cursor position and is a copy  
 of it. A pitch can be set which will be added to the new coordinate so you can set  
 them in a row.
- deleting a corner
- visualizing the corner of the current cursor position with a marker
- displaying a grid

All other routines are reworked and error handling is done.
The extracted dim's need to have the drawing library which needs to be installed first and is included in the zip.


VGAcD.zip




 
Posted: 03:38pm
25 Aug 2025
Copy link to clipboard
Amnesie
Guru

  dddns said  Nice to hear that you find it useful! :)

I've corrected a small issue and now the runtime contains some lines of demo code how to use it as a gauge:


edit:
I removed the old zip, this is the new one. Switching between Modes works now correct.
VGAcD.bas.zip


I love the idea of using this as gauge! But I have truble finding the examples in the program. Could you please point me, to where I can test this function? But this is grown to a really useful and great program!    

P.S.: I am using the HDMI version of the Pico and it works great!

Greetings
Daniel
Edited 2025-08-26 01:39 by Amnesie
 
Posted: 04:37pm
25 Aug 2025
Copy link to clipboard
dddns
Guru

Hello Amnesie,

thanks for your reply!

I have tested it in every resolution with VGA and HDMI firmware. It runs almost in every resoltion there is and fonts still fit and dimensions are kept. Please try it in Resolution 1280 and Mode 3 which looks not too bad. Of cause it looks best in Resolution 800 Mode 3, but this is only possible with PSRAM..

How to use it as a gauge you can see, when you create a runtime.
At the beginning you will find a line:
dim integer gflag = 0 'set to 1 to use gauge mode


Set it to 1 and follow the next lines of code and see how to set the value and the labels and gauge scale.

In order to create a runtime version of a clock, the file VGAcD.bas must reside on disk.
Best you create a subdirectory on A: or B: and change into it with chdir. Then copy VGAcD.bas to it and start it from that directory. All files config will be read and written from/to this and you don't have a mess in the root directory
Edited 2025-08-26 02:44 by dddns
 
Posted: 11:12pm
11 Sep 2025
Copy link to clipboard
dddns
Guru

Hello :)

I have added the last features I wanted and wrote the routines.
That's why I have rewrote and sorted have of it. But that makes a nice difference and gain in speed. An average design takes about 100ms and even in MODE 3 800x600 it never exceeds 200ms even if overloaded with items. 3,6,9 and 12 can be individual now. All polygons have a build mode and can be triangle, box, 8corner or 14 corner. Also it can be a circle with alignment or a combination. This shows all possibilities, don't laugh :)


- all menus have page numbers
- removed all string operations in the drawing routine
- shorted and renamed all variables
- cursor speed increases after 2sec when changing a value

Can't remember all changes but I think it runs pretty ok now. I think some rework and it's done so far. At the moment it runs only up to Resolution 800 without PSRAM but I have an idea how to solve it.


VGAcD1.zip
Edited 2025-09-12 09:12 by dddns
 


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025