Author: Wilfried Klaas
Category: Christmas Challenge
System: Arduino Uno
Language: C with Arduino IDE
Len source code: 1216 bytes (with comments)
Len exe file: 1564 bytes (flash size)
Len code only: 108 bytes (subtract a simple base program with serial output, startup routines -> empty.png)
Instructions:
Load the file into the Arduino IDE, than compile and Upload it to the arduino uno.
Should work with many other boards, too. Nano, Leonardo, Tiny in many variants, ESP32, ESP8622, RPI Pico
Description:
As the star is symmetrical, we only have to calculate the quadrant I and use abs() for the point coordinates
Nested loop from -8 to 8 for y,x coordinates (y-coord revcerse order, because of the terminal output)
check the middle quader (9x9)
check the rays: check if we are in a ray quader (4x4), calulate the right triangle
Comments:
I try both, calculating the dots and calulating the spaces. Dots is round about 36 bytes smaller.
Runnable file: VCCC2022.hex
Base File: empty.png, folder Empty