bikerglen
Published © GPL3+

PoE-Powered VFD Tube Clock

This is a vintage VFD tube clock that uses Ethernet for both power and data.

ExpertShowcase (no instructions)Over 1 day5,849
PoE-Powered VFD Tube Clock

Story

Read more

Code

Code snippet #1

Plain text
first = -(180-(360-306)/2);
increment = +34;
count = 10;
radius = 11.9 / 2;
text_radius = radius - 2;
drill = 1.95;

fprintf (1, 'grid mm;\n');
fprintf (1, 'change align bottom-center;\n');
fprintf (1, 'change size 32mil;\n');
fprintf (1, 'change font vector;\n');
fprintf (1, 'change ratio 16;\n');
fprintf (1, 'change drill %5.2f;\n', drill);

for i=1:count
  angle = first + (i-1) * increment;
  x = cos (angle / 180 * pi);
  y = sin (angle / 180 * pi);
  xp = x * radius;
  yp = y * radius;
  xt = x * text_radius;
  yt = y * text_radius;
  at = 90 + angle;
  %fprintf (1, "%4d %8.4f %8.4f\n", angle, x, y);
  fprintf (1, "pad '%d' round 0 (%8.4f %8.4f);\n", i, xp, yp);
  if (angle >= 0) 
    fprintf (1, "text '%d' sr%d (%8.4f %8.4f);\n", i, round(at), xt, yt);
  else
    fprintf (1, "text '%d' r%d (%8.4f %8.4f);\n", i, round(at), xt, yt);
  endif
endfor

Code snippet #2

Plain text
grid mm;
change align bottom-center;
change size 32mil;
change font vector;
change ratio 16;
change drill  1.95;
pad '1' round 0 ( -5.3015  -2.7012);
text '1' r-63 ( -3.5195  -1.7933);
pad '2' round 0 ( -2.8846  -5.2040);
text '2' r-29 ( -1.9150  -3.4547);
pad '3' round 0 (  0.5186  -5.9274);
text '3' r5 (  0.3443  -3.9350);
pad '4' round 0 (  3.7445  -4.6240);
text '4' r39 (  2.4858  -3.0697);
pad '5' round 0 (  5.6900  -1.7396);
text '5' r73 (  3.7774  -1.1549);
pad '6' round 0 (  5.6900   1.7396);
text '6' sr107 (  3.7774   1.1549);
pad '7' round 0 (  3.7445   4.6240);
text '7' sr141 (  2.4858   3.0697);
pad '8' round 0 (  0.5186   5.9274);
text '8' sr175 (  0.3443   3.9350);
pad '9' round 0 ( -2.8846   5.2040);
text '9' sr209 ( -1.9150   3.4547);
pad '10' round 0 ( -5.3015   2.7012);
text '10' sr243 ( -3.5195   1.7933);

Github

https://github.com/bikerglen/poe-vfd-clock

Credits

bikerglen

bikerglen

1 project • 0 followers

Comments