From 7513c65a4dc1cc5ea3aec6d5a61e2f1f1f88407b Mon Sep 17 00:00:00 2001 From: Robert Fach Date: Sun, 28 Jan 2018 00:19:49 +0100 Subject: [PATCH] implemented a splashscreen (with fractals) --- software/gigascan/src/config.h | 2 ++ software/gigascan/src/panobot.cpp | 15 +++++++++++++++ software/gigascan/tools/splashscreen.py | 21 +++++++++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 software/gigascan/tools/splashscreen.py diff --git a/software/gigascan/src/config.h b/software/gigascan/src/config.h index b7d8e95..14727b6 100644 --- a/software/gigascan/src/config.h +++ b/software/gigascan/src/config.h @@ -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"}; diff --git a/software/gigascan/src/panobot.cpp b/software/gigascan/src/panobot.cpp index ea31b82..f8d357f 100644 --- a/software/gigascan/src/panobot.cpp +++ b/software/gigascan/src/panobot.cpp @@ -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 @@ -430,6 +444,7 @@ void setup() { encoder.begin(); //initialize bot setupPanoBot(); + splashscreen(); } void loop() { diff --git a/software/gigascan/tools/splashscreen.py b/software/gigascan/tools/splashscreen.py new file mode 100644 index 0000000..cf90053 --- /dev/null +++ b/software/gigascan/tools/splashscreen.py @@ -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