I'm not going to be an artist (you can probably guess where I'm going after reading the rest of my entry)
Here's my entry. I'm going to upload a video of it soon(because it also spins).
(it looks like the forum isn't letting me post pictures)
How did I do it? My oscilloscope has an X-Y feature, so I took a picture of the Bitcoin logo and resized it to 32x32. Then I built a simple 5-bit digital to analog converter out of a couple of resistors. Then, I took all the coordinates on my 32x32 picture and I had the Arduino send them to the DAC. Here's the code for it if you want to try it yourself.
#define x1 12
#define x2 11
#define x4 10
#define x8 9
#define x16 8
#define y1 6
#define y2 5
#define y4 4
#define y8 3
#define y16 2
int spin(double deg, int orig){
return (int)(15.5+(orig-15.5)*sin(deg));
}
void drawCircle(double x){
int delayus = 20;
int numPoints = 31;
int xcoord[] = {0 ,0 ,1 ,1 ,1 ,1 ,1 ,1 ,2 ,2 ,2 ,3 ,3 ,4 ,4 ,5 ,5 ,6 ,6 ,7 ,7 ,8 ,9 ,9 ,10,11,12,13,13,14,15};
int ycoord[] = {15,16,16,17,18,19,20,21,21,22,23,23,24,24,25,25,26,26,27,27,28,28,28,29,29,29,29,29,30,30,30};
for (int i = 0; i setXY(spin(x,xcoord[i]), ycoord[i]);
delayMicroseconds(delayus);
}
for (int i = numPoints-1; i>=0; i--){
setXY(spin(x,31-xcoord[i]), ycoord[i]);
delayMicroseconds(delayus);
}
for (int i = 0; i setXY(spin(x,31-xcoord[i]), 30-ycoord[i]);
delayMicroseconds(delayus);
} for (int i = numPoints-1; i>=0; i--){
setXY(spin(x,xcoord[i]), 30-ycoord[i]);
delayMicroseconds(delayus);
}
}
void drawBOuter(double x){
int delayus = 20;
int numPoints = 100;
int xcoord[] = {8 ,9 ,10,11,11,11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 10 ,10,9 ,8 ,8 ,9 ,10,11,12,12,12,12,13,14,14,14,14,15,16,16,16,16,17,17,17, 17,18, 19, 19, 20,21,22,22,23,23,23,23,22,22,21,21,21,22,23,23,24,24,24,24,24,23,23,22,22,21,20,19,18,17,17,17,17,17,16,16,16,16,16,15,14,14,14,14,14,13,12,12,12,12,12,11,10,9,8};
int ycoord[] = {8 ,8 ,8 ,8 ,9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 20, 21,21,21,22,22,22,22,22,23,24,25,25,25,24,23,22,22,22,23,24,25,25,24,23, 22,22, 22, 21, 21,21,21,20,20,19,18,17,17,16,16,15,14,14,14,13,13,12,11,10,9 ,9 ,8 ,8 ,7 ,7 ,7 ,7 ,7 ,7 ,6 ,5 ,4 ,3 ,3 ,4 ,5 ,6 ,7 ,7 ,7 ,6 ,5 ,4 ,3 ,3 ,3 ,4 ,5 ,6 ,7 ,7 ,7 ,7,7};
for (int i = 0; i setXY(spin(x,xcoord[i]), ycoord[i]);
delayMicroseconds(delayus);
}
}
void drawBUpperInner(double x){
int delayus = 20;
int numPoints = 22;
int xcoord[] = {14,15,16,17,18,19, 19, 20,20 , 20, 20, 19, 19, 18 ,17,16,15,14,14,14,14,14};
int ycoord[] = {15,15,15,15,15,15, 16, 16, 17, 18, 19, 19, 20, 20, 20,20,20,20,19,18,17,16};
for (int i = 0; i setXY(spin(x,xcoord[i]), ycoord[i]);
delayMicroseconds(delayus);
}
}
void drawBLowerInner(double x){
int delayus = 20;
int numPoints = 26;
int xcoord[] = {14,15,16,17,18,19, 19, 20,20, 21, 21, 21, 21, 20, 19, 19, 18 ,17,16,15,14,14,14,14,14,14};
int ycoord[] = {8 ,8 ,8 ,8 ,8 ,8 , 9 , 9, 10, 10, 11, 12, 13, 13, 13, 14, 14, 14,14,14,14,13,12,11,10,9};
for (int i = 0; i setXY(spin(x,xcoord[i]), ycoord[i]);
delayMicroseconds(delayus);
}
}
void setXY(int x, int y){
digitalWrite(x1, x%2);
x=x>>1;
digitalWrite(x2, x%2);
x=x>>1;
digitalWrite(x4, x%2);
x=x>>1;
digitalWrite(x8, x%2);
x=x>>1;
digitalWrite(x16, x%2);
digitalWrite(y1, y%2);
y=y>>1;
digitalWrite(y2, y%2);
y=y>>1;
digitalWrite(y4, y%2);
y=y>>1;
digitalWrite(y8, y%2);
y=y>>1;
digitalWrite(y16, y%2);
}
void setup() {
pinMode(x1, OUTPUT);
pinMode(x2, OUTPUT);
pinMode(x4, OUTPUT);
pinMode(x8, OUTPUT);
pinMode(x16, OUTPUT);
pinMode(y1, OUTPUT);
pinMode(y2, OUTPUT);
pinMode(y4, OUTPUT);
pinMode(y8, OUTPUT);
pinMode(y16, OUTPUT);
}
double x = 3.14/2;
void loop() {
drawCircle(x);
drawBOuter(x);
drawBUpperInner(x);
drawBLowerInner(x);
x=x+0.03;
}
The circuit can be found here. It's basically two R2R ladders and an Arduino:
Here's my bitcoin address: 3LGFCYRgpqsJXdUjvn5AHhvEetb726YrgL
If this gets 10 merits I'm drawing more stuff.
Edit: That was quick. What should I draw next?
https://www.youtube.com/watch?v=FoGXVam3CNUHere's the video (it's not very good quality because I took it with my phone)
Edit 2: I'll have the other drawing done this week.
I'm back (as promised). Time for a little more programming and electronics.
I increased the resolution by adding more resistors. Now it's 8-bit instead of 5-bit. Drawing all the lines manually would be almost impossible, so I made a program to help.
This java code accepts any image that's black and white and 256x256. The threshold is set to 128, so pixels that are more black than white will be converted into just black and vice versa. (There are also image conversion tools that do this, like this:
). It then makes a hexadecimal string which basically encodes the picture. The hexadecimal string is converted back into the picture by the Arduino.
There's a few bugs that I have to iron out when I have more time. The conversion somehow rotates the picture, so if you want it to look perfect, try rotating the image clockwise before using this tool. I haven't tested this extensively, don't be surprised if your picture gets destroyed somehow.
To test it out, I had it display my bitcoin QR code, and I tried to see if my camera could scan it. It actually scanned! (You might have to fiddle with the oscilloscope controls a little bit.)
As for art, I'm going to try it with a few bitcoin-related pictures soon. Suggestions welcome.
A much better quality bitcoin (compared to the first one I made which has 64x less resolution)