From 2b4a6fc3f7289b7a9c097560e0e9a40d09105a1b Mon Sep 17 00:00:00 2001 From: georges Date: Sun, 4 Aug 2013 21:02:32 +0100 Subject: [PATCH] 7segs with colors and stuff --- .../rgb7segplayer_ino/rgb7segplayer_ino.ino | 40 +++++++++++++------ 1 file changed, 27 insertions(+), 13 deletions(-) diff --git a/PoC/rgb7seg/rgb7segplayer_ino/rgb7segplayer_ino.ino b/PoC/rgb7seg/rgb7segplayer_ino/rgb7segplayer_ino.ino index a2a14c9..893e465 100644 --- a/PoC/rgb7seg/rgb7segplayer_ino/rgb7segplayer_ino.ino +++ b/PoC/rgb7seg/rgb7segplayer_ino/rgb7segplayer_ino.ino @@ -87,25 +87,32 @@ int d; } switch (segment) { case 0: - matrix.drawLine(0,d+1,0,d+2, matrix.Color888(r,g,b)); +// matrix.drawLine(0,d+1,0,d+2, matrix.Color888(r,g,b)); + matrix.drawLine(0,d,0,d+3, matrix.Color888(r,g,b)); break; case 1: - matrix.drawLine(1,d,2,d, matrix.Color888(r,g,b)); +// matrix.drawLine(1,d,2,d, matrix.Color888(r,g,b)); + matrix.drawLine(0,d,3,d, matrix.Color888(r,g,b)); break; case 2: - matrix.drawLine(4,d,5,d, matrix.Color888(r,g,b)); +// matrix.drawLine(4,d,5,d, matrix.Color888(r,g,b)); + matrix.drawLine(3,d,6,d, matrix.Color888(r,g,b)); break; case 3: - matrix.drawLine(6,d+1,6,d+2, matrix.Color888(r,g,b)); +// matrix.drawLine(6,d+1,6,d+2, matrix.Color888(r,g,b)); + matrix.drawLine(6,d,6,d+3, matrix.Color888(r,g,b)); break; case 4: - matrix.drawLine(4,d+3,5,d+3, matrix.Color888(r,g,b)); +// matrix.drawLine(4,d+3,5,d+3, matrix.Color888(r,g,b)); + matrix.drawLine(3,d+3,6,d+3, matrix.Color888(r,g,b)); break; case 5: - matrix.drawLine(1,d+3,2,d+3, matrix.Color888(r,g,b)); +// matrix.drawLine(1,d+3,2,d+3, matrix.Color888(r,g,b)); + matrix.drawLine(0,d+3,3,d+3, matrix.Color888(r,g,b)); break; case 6: - matrix.drawLine(3,d+1,3,d+2, matrix.Color888(r,g,b)); +// matrix.drawLine(3,d+1,3,d+2, matrix.Color888(r,g,b)); + matrix.drawLine(3,d,3,d+3, matrix.Color888(r,g,b)); break; case 7: matrix.drawLine(7,d,7,d, matrix.Color888(r,g,b)); @@ -209,11 +216,18 @@ int printChar(int display, char c, int r, int g, int b) { segs=ascii2segments[c-32]; // get bit pattern what to light for(int i=8;i>=0;i--) { if(segs & (1<=0;i--) { + if(segs & (1<