This program is a port and mod of Antoni Gual Via's program shared with the "BASIC, QBasic, GWBasic computer programming"' Facebook group.
- About the program
- How to set an LED colour preference
- How to embed the clock in a Web page
- How to download the clock to run locally or host it on your own website
About the program
Antoni Gual Via created with QBasic a "digital 7 segment clock using only DRAW." I've made some changes to placate my fussy nature and a little addition:
- I've filled in the segments (using PAINT, because BAM's DRAW statement does not support the "p" (paint) command
- I'm using screen mode 17 instead of screen mode 12 (for the LED: access to 63 predefined colors, instead of only 15 colors; black is reserved for the clock background colour)
- I'm also using a custom screen resolution
- I've also modified the program to check the URL for a "color" query string which can be used to customize the colour of the clock LED lights.
- The URL for the program without specifying a colour preference
- https://basicanywheremachine.neocities.org/sample_programs/DRAW%20DIGITAL%20CLOCK.prod.run
- The URL for the program with a colour preference specified
- https://basicanywheremachine.neocities.org/sample_programs/DRAW%20DIGITAL%20CLOCK.prod.run?color=15
How to embed the clock in a Web page
How to download the clock to run locally or host it on your own website
Aside: The Chrome web browser on my Chromebook allows setting up an HTML page as an "app", so that the HTML page appears as a stand-alone application, instead of a Web browser tab. The Chromebook remembers the location and size of the clock program. Neat !