Skip to content

Commit

Permalink
Merge branch 'splashscreen' into 'master'
Browse files Browse the repository at this point in the history
implemented a splashscreen (with fractals)

See merge request !16
  • Loading branch information
RobertFach committed Jan 27, 2018
2 parents 2f236fc + 7513c65 commit 916e2d8
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
2 changes: 2 additions & 0 deletions software/gigascan/src/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,5 @@ e-mail : robert.fach@gmx.net
//negative means active internal pull-up
#define ENCODER_BTN_PIN -44
#define DISPLAY_RESET_BTN_PIN -49 //negative means active internal pull-up

const char SPLASHSCREEN[] PROGMEM = { "00000000000000000000000000001111111100001100101000000000000000000000000000000000000000000011111111111100110010100000000000000000000000000000000000000000011111111110111110000000000000000000000000000000000000000000001001111111111001111110000000000000000000000000000000000000000001011010111111101111111100000000000000000000000000000000000000000111000011111111111111111000000000000000000000000000000000000000001010011111111111111111100000000000000000000000000000000000000000001001111111111111111110000000000000000000000000000000000000000001000111111111111111100000000000000000000000000000000000000000000100000111110111111111010000000000000000000000000000000000000000000001111111011111111101000000000000000000000000000000000000000000001111111100111111111000000000000000000000000000000000000000000001111101111011111111000000000000000000000000000000000000000000000111110011101111111000000000000000000000000000000000000000000000111111010010001111110000000000000000000000000000000000000000000101111100000000011110000000000000000000000000000000000000000000000111111100000001010000000000000000000000000000000000000000000000111111100000000100000000000000000000000000000000000000000000000001110100000000000000000000000000000000000000000000000000000000000001010000000000000000000000000000000000000000000000000000000001001101000000000000000000000000000000000000000000000000000000000110110000000000000000000000000000000000000000000000000000000000000111100000000000000000000000000000000000000000000000000000000000011110000001110000000000000000000000000000000000000000000000000001110000001111110000000000000000000000000000000000000000000000000111010001111111000000000000000000000000000000000000000000000000011100000110001110000000000000000000000000000000000000000000000001011000010000011100000000000000000000000000000000000000000000000001100001000001110000000000000000000000000000000000000000000000010111000111000111100100000000000000000000000000000000000000000000011100011110001111000000000000000000000000000000000000000000000000110001111000101101000000000000000000000000000000000000000000000111000010100011110100000000000000000000000000000000000000000000001110000010000111010000000000000000000000000000000000000000000000111000001000011111000000000000000000000000000000000000000000000001110001100001011110000000000000000000000000000000000000000000000111111100000101111010100000000000000000000000000000000000000000000111100000001111101100000000000000000000000000000000000000000000001101000000111110001000000000000000000000000000000000000000000001000000000011110001000000000000000000000000000000000000000000000000000000001111100100000000000000000000000000000000000000000000000000000001011100010000000000000000000000000000000000000000000000000000001100110001000000000000000000000000000000000010000100000000000000000011111100000000000000000000000000000000001110110000000000000001011111110000000000000000000000000000000000001010000000000000000001111110000000000000000000000000000001001101111001000000000000011111111010000000000000000000000000000100010011111100000000000001111111100000000000000000000000000000010111011111110100000000101111111111000000000000000000000000000011001111111111111000000010111111111100000000000000000000000000000110001111111111100000001101111111110000000000000000000000000000001010111111111000000000110011111111000000000000000000000000000000000111111111110101100001001111111100000000000000000000000000000000111111111111110110010000111111110000000000000000000000000000011101111111111111110111100001111110000000000000000000000000000011110111111111111101011110001111110000100000000000000000000000000111111111111111110001111110111110000111110000000000000000000001011111111111111111000011111111111100011011000000000000000000000001111111111111111110011111111100100010011110000000000000000000011111111111111111110011111111110000001000011000000000000000000011101001111111111111100111111111001000110011011000000000000010000111100111111111111110011111111110100011101101100000000000000110110001011111111111111111111111111010001100110010000000000000011010000011111111111111111111111111110000001011110000000000000011101000001111111111111111111111111111100000101110000000000000011110100000011111111111111111111111111110000010110000000000000010011001100010111111111111111111111111110100011011000000000000001101101110001011111111110011111111111111001111000010000000000000110110011000100111111111001111111111111100101110000000000000000000110000100000011111111110011111111111111111110000000000000000000011110010001001111111110011111111111111111100000000000000000000000110110001111111111110000111111111111111110100000000000000000000011111000011111011111100011111111111111111000000000000000000000000001000011111100011110101111111111111011110000000000000000000000000000011111100001111011111111111111101110000000000000000000000000000011111111000010011011111111111111000000000000000000000000000000001111111100100001101011111111111000000000000000000000000000000000111111110011000000000111111111010100000000000000000000000000000011111111101100000001111111111100011000000000000000000000000000001111111111010000000111111111111100110000000000000000000000000000111111111101000000001011111110111010000000000000000000000000000001111111100000000000001111110010001000000000000000000000000000010111111110000000000000100111101100100000000000000000000000000000011111100000000000000000010100000000000000000000000000000000000011111110100000000000000011011100000000000000000000000000000000001111110000000000000000001000010000000000000000000000000000000000100011001100000000000000000000000000000000000000000000000000000010001110100000000000000000000000000000000000000000000000000000001001111100000000000000000000000000000000000000000000000000000000100011110000000000100000000000000000000000000000000000000000000100011111000000101100000000000000000000000000000000000000000000001101111100000001111000000000000000000000000000000000000000000001010111101000001111111000000000000000000000000000000000000000000000011110100001100011100000000000000000000000000000000000000000000000111110000100000111000000000000000000000000000000000000000000000010111000010000011100000000000000000000000000000000000000000000001011110001010000111000000000000000000000000000000000000000000000101101000111100011000000000000000000000000000000000000000000000000111100011110001110000000000000000000000000000000000000000000001001111000111000111010000000000000000000000000000000000000000000000011100000100001100000000000000000000000000000000000000000000000001110000010000110100000000000000000000000000000000000000000000000011100011000001110000000000000000000000000000000000000000000000000111111100010111000000000000000000000000000000000000000000000000011111100000011100000000000000000000000000000000000000000000000000011100000011110000000000000000000000000000000000000000000000000000000000001111000000000000000000000000000000000000000000000000000000000000011011000000000000000000000000000000000000000000000000000000000101100100000000000000000000000000000000000000000000000000000000010100000000000000000000000000000000000000000000000000000000000001011100000000000000000000000000000000000000000000000001000000001111111000000000000000000000000000000000000000000000010100000001111111000000000000000000000000000000000000000000000011110000000001111101000000000000000000000000000000000000000000011111100010010111111000000000000000000000000000000000000000000000111111101110011111000000000000000000000000000000000000000000000111111110111101111100000000000000000000000000000000000000000000111111111001111111100000000000000000000000000000000000000000000101111111110111111100000000000000000000000000000000000000000000010111111111011111000001000000000000000000000000000000000000000000001111111111111111000100000000000000000000000000000000000000000011111111111111111100100000000000000000000000000000000000000000001111111111111111110010100000000000000000000000000000000000000000111111111111111110000111000000000000000000000000000000000000000001111111101111111010110100000000000000000000000000000000000000000011111100111111111100100000000000000000000000000000000000000000000011111011111111110000000000000000000000000000000000000000001010011001111111111110000000000000000000000000"};
15 changes: 15 additions & 0 deletions software/gigascan/src/panobot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,20 @@ void drawStatus() {
g_updateStatus = false;
}

void splashscreen() {
u8g2.clearBuffer();
int x;
int y;
for (x=0;x<128;x++) {
for (y=0;y<64;y++) {
if (pgm_read_byte_near(SPLASHSCREEN + x*64+y) =='1')
u8g2.drawPixel(x, y);
}
}
u8g2.sendBuffer();
delay(5000);
}

void setup() {
options = &myOptions;
//initialize Serial interface
Expand All @@ -430,6 +444,7 @@ void setup() {
encoder.begin();
//initialize bot
setupPanoBot();
splashscreen();
}

void loop() {
Expand Down
21 changes: 21 additions & 0 deletions software/gigascan/tools/splashscreen.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import sys
cx = -0.8;
cy = 0.156;

for x in range(0,128):
for y in range(0,64):
zx = float(x)/128 * 2 - 1;
zy = float(y)/64 * 2 - 1;
iteration = 0;
max_iteration = 50;
while (zx*zx+zy*zy<4 and iteration<max_iteration):
xtemp = zx*zx-zy*zy;
zy = 2*zx*zy+cy;
zx = xtemp + cx;

iteration += 1;

if (iteration == max_iteration):
sys.stdout.write("1")
else:
sys.stdout.write("0")

0 comments on commit 916e2d8

Please sign in to comment.