A quick toss of my hat into the LED emulation game:
size = 10 'A nice size to start testing with
message$ = "Testing the code" 'A default message. Feel free to change it.
kolor
= _RGB32(255, 255, 0) 'And the color of our LED
GenerateWorkscreen size, message$, kolor
DisplayWorkscreen StartX, StartY
StartX
= StartX
- size:
IF StartX
< 0 THEN StartX
= 0 StartX = StartX + size
size = size + 1
GenerateWorkscreen size, message$, kolor
size
= size
- 1:
IF size
< 1 THEN size
= 1 GenerateWorkscreen size, message$, kolor
SUB DisplayWorkscreen
(StartX
, StartY
)
SUB GenerateWorkscreen
(size
, message$
, kolor
) 'create ASCII characters
IF POINT(x
, y
) THEN CircleFill x
* size
, y
* size
, size
/ 2 - 1, kolor
RadiusError = -Radius
X = Radius
Y = 0
' Draw the middle span here so we don't draw it twice in the main loop,
' which would be a problem with blending turned on.
LINE (CX
- X
, CY
)-(CX
+ X
, CY
), C
, BF
RadiusError = RadiusError + Y * 2 + 1
LINE (CX
- Y
, CY
- X
)-(CX
+ Y
, CY
- X
), C
, BF
LINE (CX
- Y
, CY
+ X
)-(CX
+ Y
, CY
+ X
), C
, BF
X = X - 1
RadiusError = RadiusError - X * 2
Y = Y + 1
LINE (CX
- X
, CY
- Y
)-(CX
+ X
, CY
- Y
), C
, BF
LINE (CX
- X
, CY
+ Y
)-(CX
+ X
, CY
+ Y
), C
, BF
Three import variables which you can change to play around with things:
size = 10 'A nice size to start testing with
message$ = "Testing the code" 'A default message. Feel free to change it.
kolor = _RGB32(255, 255, 0) 'And the color of our LED
And a few basic controls:
UP/DOWN arrow keys will increase/decrease the size of the LEDs.
LEFT/RIGHT will scroll the screen so you can view any portion of the message which is currently off-screen.
SPACE/ESC will end the program
**********************
With just a little modification, one could make this an automatic scrolling routine, make the lights blink/flicker, or use it for multi-line displays (like with Buddy)... The sky's the limit!!