MECHANICAL FLIP DOT DISPLAY

Hi everyone! This week project is a 3D printed mechanical flip-dot display.

Enjoy!

The code of the device here:

#include <Servo.h>

Servo dot;
/*int servomatrix[5][5] = {{31, 47, 35, 52, 36},
{29, 49, 41, 44, 40},
{33, 45, 43, 50, 38},
{27, 51, 39, 48, 34},
{26, 53, 37, 46, 42}};*/

int servomatrix[5][5] = {{36, 52, 35, 47, 31},
{40, 44, 41, 49, 29},
{38, 50, 43, 45, 33},
{34, 48, 39, 51, 27},
{42, 46, 37, 53, 26}};

int a[5][5] = {{0, 0, 1, 0, 0},
{0, 1, 0, 1, 0},
{1, 0, 0, 0, 1},
{1, 1, 1, 1, 1},
{1, 0, 0, 0, 1}};

int b[5][5] = {{1, 1, 1, 1, 0},
{1, 0, 0, 0, 1},
{1, 1, 1, 1, 0},
{1, 0, 0, 0, 1},
{1, 1, 1, 1, 0}};

int c[5][5] = {{0, 1, 1, 1, 1},
{1, 0, 0, 0, 0},
{1, 0, 0, 0, 0},
{1, 0, 0, 0, 0},
{0, 1, 1, 1, 1}};

int d[5][5] = {{1, 1, 1, 1, 0},
{1, 0, 0, 0, 1},
{1, 0, 0, 0, 1},
{1, 0, 0, 0, 1},
{1, 1, 1, 1, 0}};

int e[5][5] = {{1, 1, 1, 1, 1},
{1, 0, 0, 0, 0},
{1, 1, 1, 1, 0},
{1, 0, 0, 0, 0},
{1, 1, 1, 1, 1}};

int f[5][5] = {{1, 1, 1, 1, 1},
{1, 0, 0, 0, 0},
{1, 1, 1, 1, 0},
{1, 0, 0, 0, 0},
{1, 0, 0, 0, 0}};

int g[5][5] = {{0, 1, 1, 1, 1},
{1, 0, 0, 0, 0},
{1, 0, 0, 1, 1},
{1, 0, 0, 0, 1},
{0, 1, 1, 1, 0}};

int h[5][5] = {{1, 0, 0, 0, 1},
{1, 0, 0, 0, 1},
{1, 1, 1, 1, 1},
{1, 0, 0, 0, 1},
{1, 0, 0, 0, 1}};

int i[5][5] = {{0, 1, 1, 1, 0},
{0, 0, 1, 0, 0},
{0, 0, 1, 0, 0},
{0, 0, 1, 0, 0},
{0, 1, 1, 1, 0}};

int j[5][5] = {{0, 1, 1, 1, 1},
{0, 0, 0, 1, 0},
{0, 0, 0, 1, 0},
{1, 0, 0, 1, 0},
{0, 1, 1, 0, 0}};

int k[5][5] = {{1, 0, 0, 0, 1},
{1, 0, 0, 1, 0},
{1, 1, 1, 0, 0},
{1, 0, 0, 1, 0},
{1, 0, 0, 0, 1}};

int l[5][5] = {{1, 0, 0, 0, 0},
{1, 0, 0, 0, 0},
{1, 0, 0, 0, 0},
{1, 0, 0, 0, 0},
{1, 1, 1, 1, 1}};

int m[5][5] = {{1, 0, 0, 0, 1},
{1, 1, 0, 1, 1},
{1, 0, 1, 0, 1},
{1, 0, 0, 0, 1},
{1, 0, 0, 0, 1}};

int n[5][5] = {{1, 0, 0, 0, 1},
{1, 1, 0, 0, 1},
{1, 0, 1, 0, 1},
{1, 0, 0, 1, 1},
{1, 0, 0, 0, 1}};

int ne[5][5] = {{1, 0, 1, 0, 1},
{1, 1, 0, 0, 1},
{1, 0, 1, 0, 1},
{1, 0, 0, 1, 1},
{1, 0, 0, 0, 1}};

int o[5][5] = {{0, 1, 1, 1, 0},
{1, 0, 0, 0, 1},
{1, 0, 0, 0, 1},
{1, 0, 0, 0, 1},
{0, 1, 1, 1, 0}};

int p[5][5] = {{1, 1, 1, 1, 0},
{1, 0, 0, 0, 1},
{1, 1, 1, 1, 0},
{1, 0, 0, 0, 0},
{1, 0, 0, 0, 0}};

int q[5][5] = {{0, 1, 1, 1, 0},
{1, 0, 0, 0, 1},
{1, 0, 0, 0, 1},
{1, 0, 0, 1, 1},
{0, 1, 1, 1,1}};

int r[5][5] = {{1, 1, 1, 1, 0},
{1, 0, 0, 0, 1},
{1, 1, 1, 1, 0},
{1, 0, 0, 1, 0},
{1, 0, 0, 0, 1}};

int s[5][5] = {{0, 1, 1, 1, 1},
{1, 0, 0, 0, 0},
{0, 1, 1, 1, 0},
{0, 0, 0, 0, 1},
{1, 1, 1, 1, 0}};

int t[5][5] = {{1, 1, 1, 1, 1},
{0, 0, 1, 0, 0},
{0, 0, 1, 0, 0},
{0, 0, 1, 0, 0},
{0, 0, 1, 0, 0}};

int u[5][5] = {{1, 0, 0, 0, 1},
{1, 0, 0, 0, 1},
{1, 0, 0, 0, 1},
{1, 0, 0, 0, 1},
{0, 1, 1, 1, 0}};

int v[5][5] = {{1, 0, 0, 0, 1},
{1, 0, 0, 0, 1},
{1, 0, 0, 0, 1},
{0, 1, 0, 1, 0},
{0, 0, 1, 0, 0}};

int w[5][5] = {{1, 0, 0, 0, 1},
{1, 0, 0, 0, 1},
{1, 0, 0, 0, 1},
{1, 0, 1, 0, 1},
{0, 1, 0, 1, 0}};

int x[5][5] = {{1, 0, 0, 0, 1},
{0, 1, 0, 1, 0},
{0, 0, 1, 0, 0},
{0, 1, 0, 1, 0},
{1, 0, 0, 0, 1}};

int y[5][5] = {{1, 0, 0, 0, 1},
{0, 1, 0, 1, 0},
{0, 0, 1, 0, 0},
{0, 0, 1, 0, 0},
{0, 0, 1, 0, 0}};

int z[5][5] = {{1, 1, 1, 1, 1},
{0, 0, 0, 1, 0},
{0, 1, 1, 1, 0},
{0, 1, 0, 0, 0},
{1, 1, 1, 1, 1}};

int cero[5][5] = {{0, 1, 1, 1, 0},
{1, 0, 0, 0, 1},
{1, 0, 0, 0, 1},
{1, 0, 0, 0, 1},
{0, 1, 1, 1, 0}};

int uno[5][5] = {{0, 0, 1, 0, 0},
{0, 1, 1, 0, 0},
{0, 0, 1, 0, 0},
{0, 0, 1, 0, 0},
{0, 1, 1, 1, 0}};

int dos[5][5] = {{0, 1, 1, 1, 0},
{1, 0, 0, 0, 1},
{0, 0, 1, 1, 0},
{0, 1, 0, 0, 0},
{1, 1, 1, 1, 1}};

int tres[5][5] = {{1, 1, 1, 1, 0},
{0, 0, 0, 0, 1},
{0, 0, 1, 1, 0},
{0, 0, 0, 0, 1},
{1, 1, 1, 1, 0}};

int cuatro[5][5] = {{1, 0, 0, 0, 1},
{1, 0, 0, 0, 1},
{1, 1, 1, 1, 1},
{0, 0, 0, 0, 1},
{0, 0, 0, 0, 1}};

int cinco[5][5] = {{1, 1, 1, 1, 1},
{1, 0, 0, 0, 0},
{1, 1, 1, 1, 0},
{0, 0, 0, 0, 1},
{1, 1, 1, 1, 0}};

int seis[5][5] = {{0, 1, 1, 1, 1},
{1, 0, 0, 0, 0},
{1, 0, 0, 0, 0},
{1, 0, 0, 0, 1},
{0, 1, 1, 1, 0}};

int siete[5][5] = {{1, 1, 1, 1, 1},
{0, 0, 0, 0, 1},
{0, 0, 0, 1, 0},
{0, 1, 0, 0, 0},
{1, 0, 0, 0, 0}};

int ocho[5][5] = {{0, 1, 1, 1, 0},
{1, 0, 0, 0, 1},
{0, 1, 1, 1, 0},
{1, 0, 0, 0, 1},
{0, 1, 1, 1, 0}};

int nueve[5][5] = {{0, 1, 1, 1, 0},
{1, 0, 0, 0, 1},
{1, 0, 0, 0, 1},
{0, 0, 0, 0, 1},
{0, 0, 0, 0, 1}};

int inter[5][5] = {{0, 1, 1, 1, 0},
{1, 0, 0, 0, 1},
{0, 0, 0, 1, 0},
{0, 0, 0, 0, 0},
{0, 0, 1, 0, 0}};

int excla[5][5] = {{0, 0, 1, 0, 0},
{0, 0, 1, 0, 0},
{0, 0, 1, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 1, 0, 0}};

int hashtag[5][5] = {{0, 1, 0, 1, 0},
{1, 1, 1, 1, 1},
{0, 1, 0, 1, 0},
{1, 1, 1, 1, 1},
{0, 1, 0, 1, 0}};

int displaydot[5][10] = {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
void transferdot(int letra[5][5])
{
for (int x=0;x<5;x++)
{
for (int y=0;y<5;y++)
{
displaydot[x][y+5]=letra[x][y];
}
}
}
void scroll()
{
for (int x=0;x<5;x++)
{
for (int y=0;y<9;y++)
{
displaydot[x][y]=displaydot[x][y+1];

}
displaydot[x][9]=0;
}
}

void show()
{
for (int x=0;x<5;x++)
{
for (int y=0;y<5;y++)
{
dot.attach(servomatrix[x][y]);
dot.write(180-(displaydot[x][y]*180));
delay(500);
}
}

}

void showletra(int letra[5][5],int maxim)
{
for (int x=0;x<5;x++)
{
for (int y=0;y<5;y++)
{
dot.attach(servomatrix[x][y]);
dot.write(180-(letra[x][y]*maxim));
delay(500);
}
}

}

void setup() {

}
void testodos(int maxim,int minim)
{
for (int x=0;x<5;x++)
{
for (int y=0;y<5;y++)
{
dot.attach(servomatrix[x][y]);
dot.write(maxim);
delay(500);

dot.write(minim);
delay(500);
dot.detach();
}
}

}
void wr(int let[5][5])
{
transferdot(let);
show();
scroll();
show();
scroll();
show();
scroll();
show();
scroll();
show();
scroll();
show();
scroll();
}
void pleasesubscribe()
{
wr(s);
wr(u);
wr(b);
wr(s);
wr(c);
wr(r);
wr(i);
wr(b);
wr(e);

}

void pleasesubscribe()
{
wr(s);
wr(u);
wr(b);
wr(s);
wr(c);
wr(r);
wr(i);
wr(b);
wr(e);

}

void loop() {
pleasesubscribe();

}

Share Post :

More Posts