From 5fe38bfa832822fe307a8e1ba84f7b46049e3377 Mon Sep 17 00:00:00 2001 From: MightyPork Date: Fri, 19 Dec 2014 12:39:01 +0100 Subject: [PATCH] y --- pov-led-globe/globe-timed-experimental | 1 - .../globe-timed-experimentalsd/Makefile | 154 +++++++ .../image/README.txt | 47 ++ .../image/aliensflip16.h | 321 ++++++++++++++ .../globe-timed-experimentalsd/image/butt.h | 321 ++++++++++++++ .../image/checker3264.h | 401 ++++++++++++++++++ .../image/checker3264.xcf | Bin 0 -> 1134 bytes .../image/checker3264numbers.h | 401 ++++++++++++++++++ .../image/checker3264numbers.xcf | Bin 0 -> 1409 bytes .../image/getbytes.py | 73 ++++ .../globe-timed-experimentalsd/image/globus.h | 401 ++++++++++++++++++ .../image/globus.xcf | Bin 0 -> 1058 bytes .../globe-timed-experimentalsd/image/logo16.h | 289 +++++++++++++ .../image/logo16.xcf | Bin 0 -> 1003 bytes .../globe-timed-experimentalsd/image/logo32.h | 337 +++++++++++++++ .../image/logo32.xcf | Bin 0 -> 1293 bytes .../globe-timed-experimentalsd/image/pig.h | 289 +++++++++++++ .../globe-timed-experimentalsd/image/pig16.h | 31 ++ .../image/pig16.xcf | Bin 0 -> 1180 bytes .../image/snowflake.h | 289 +++++++++++++ .../image/snowflake.xcf | Bin 0 -> 849 bytes .../image/some-aliens.xcf | Bin 0 -> 1057 bytes .../image/test_narrow.h | 289 +++++++++++++ .../image/test_narrow.xcf | Bin 0 -> 838 bytes .../image/test_wide.h | 305 +++++++++++++ .../image/test_wide.xcf | Bin 0 -> 1040 bytes .../image_aliensflip16.h | 49 +++ .../image_chk3264.h | 71 ++++ .../image_chk3264numbers.h | 71 ++++ .../image_globus32.h | 65 +++ .../globe-timed-experimentalsd/image_logo16.h | 23 + .../globe-timed-experimentalsd/image_logo32.h | 39 ++ .../globe-timed-experimentalsd/image_pig16.h | 23 + .../image_snowflake16.h | 22 + .../image_test_narrow16.h | 11 + .../image_test_wide16.h | 39 ++ .../globe-timed-experimentalsd/main.c | 212 +++++++++ .../test_narrow16.h | 11 + .../globe-timed-experimentalsd/utils.h | 14 + 39 files changed, 4598 insertions(+), 1 deletion(-) delete mode 160000 pov-led-globe/globe-timed-experimental create mode 100644 pov-led-globe/globe-timed-experimentalsd/Makefile create mode 100644 pov-led-globe/globe-timed-experimentalsd/image/README.txt create mode 100644 pov-led-globe/globe-timed-experimentalsd/image/aliensflip16.h create mode 100644 pov-led-globe/globe-timed-experimentalsd/image/butt.h create mode 100644 pov-led-globe/globe-timed-experimentalsd/image/checker3264.h create mode 100644 pov-led-globe/globe-timed-experimentalsd/image/checker3264.xcf create mode 100644 pov-led-globe/globe-timed-experimentalsd/image/checker3264numbers.h create mode 100644 pov-led-globe/globe-timed-experimentalsd/image/checker3264numbers.xcf create mode 100755 pov-led-globe/globe-timed-experimentalsd/image/getbytes.py create mode 100644 pov-led-globe/globe-timed-experimentalsd/image/globus.h create mode 100644 pov-led-globe/globe-timed-experimentalsd/image/globus.xcf create mode 100644 pov-led-globe/globe-timed-experimentalsd/image/logo16.h create mode 100644 pov-led-globe/globe-timed-experimentalsd/image/logo16.xcf create mode 100644 pov-led-globe/globe-timed-experimentalsd/image/logo32.h create mode 100644 pov-led-globe/globe-timed-experimentalsd/image/logo32.xcf create mode 100644 pov-led-globe/globe-timed-experimentalsd/image/pig.h create mode 100644 pov-led-globe/globe-timed-experimentalsd/image/pig16.h create mode 100644 pov-led-globe/globe-timed-experimentalsd/image/pig16.xcf create mode 100644 pov-led-globe/globe-timed-experimentalsd/image/snowflake.h create mode 100644 pov-led-globe/globe-timed-experimentalsd/image/snowflake.xcf create mode 100644 pov-led-globe/globe-timed-experimentalsd/image/some-aliens.xcf create mode 100644 pov-led-globe/globe-timed-experimentalsd/image/test_narrow.h create mode 100644 pov-led-globe/globe-timed-experimentalsd/image/test_narrow.xcf create mode 100644 pov-led-globe/globe-timed-experimentalsd/image/test_wide.h create mode 100644 pov-led-globe/globe-timed-experimentalsd/image/test_wide.xcf create mode 100644 pov-led-globe/globe-timed-experimentalsd/image_aliensflip16.h create mode 100644 pov-led-globe/globe-timed-experimentalsd/image_chk3264.h create mode 100644 pov-led-globe/globe-timed-experimentalsd/image_chk3264numbers.h create mode 100644 pov-led-globe/globe-timed-experimentalsd/image_globus32.h create mode 100644 pov-led-globe/globe-timed-experimentalsd/image_logo16.h create mode 100644 pov-led-globe/globe-timed-experimentalsd/image_logo32.h create mode 100644 pov-led-globe/globe-timed-experimentalsd/image_pig16.h create mode 100644 pov-led-globe/globe-timed-experimentalsd/image_snowflake16.h create mode 100644 pov-led-globe/globe-timed-experimentalsd/image_test_narrow16.h create mode 100644 pov-led-globe/globe-timed-experimentalsd/image_test_wide16.h create mode 100644 pov-led-globe/globe-timed-experimentalsd/main.c create mode 100644 pov-led-globe/globe-timed-experimentalsd/test_narrow16.h create mode 100644 pov-led-globe/globe-timed-experimentalsd/utils.h diff --git a/pov-led-globe/globe-timed-experimental b/pov-led-globe/globe-timed-experimental deleted file mode 160000 index 4eaff23..0000000 --- a/pov-led-globe/globe-timed-experimental +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 4eaff23a1d463fd916f5a983fd202e0707c12af7 diff --git a/pov-led-globe/globe-timed-experimentalsd/Makefile b/pov-led-globe/globe-timed-experimentalsd/Makefile new file mode 100644 index 0000000..6a7defa --- /dev/null +++ b/pov-led-globe/globe-timed-experimentalsd/Makefile @@ -0,0 +1,154 @@ + +MCU = attiny13 + +F_CPU = 9600000 + +LFUSE = 0x7A +HFUSE = 0xFF +EFUSE = 0x00 + +MAIN = main.c + +## If you've split your program into multiple files, +## include the additional .c source (in same directory) here +## (and include the .h files in your foo.c) +LOCAL_SOURCE = + +## Here you can link to one more directory (and multiple .c files) +# EXTRA_SOURCE_DIR = ../AVR-Programming-Library/ +EXTRA_SOURCE_DIR = +EXTRA_SOURCE_FILES = + + + +##########------------------------------------------------------########## +########## Programmer Defaults ########## +########## Set up once, then forget about it ########## +########## (Can override. See bottom of file.) ########## +##########------------------------------------------------------########## + +PROGRAMMER_TYPE = dragon_isp +PROGRAMMER_ARGS = + + +##########------------------------------------------------------########## +########## Makefile Magic! ########## +########## Summary: ########## +########## We want a .hex file ########## +########## Compile source files into .elf ########## +########## Convert .elf file into .hex ########## +########## You shouldn't need to edit below. ########## +##########------------------------------------------------------########## + +## Defined programs / locations +CC = avr-gcc +OBJCOPY = avr-objcopy +OBJDUMP = avr-objdump +AVRSIZE = avr-size +AVRDUDE = sudo avrdude + +## Compilation options, type man avr-gcc if you're curious. +CFLAGS = -std=gnu99 -mmcu=$(MCU) -DF_CPU=$(F_CPU)UL -Os -I. -I$(EXTRA_SOURCE_DIR) +CFLAGS += -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums +CFLAGS += -Wall -Wstrict-prototypes +CFLAGS += -g2 -ggdb +CFLAGS += -ffunction-sections -fdata-sections -Wl,--gc-sections -Wl,--relax +CFLAGS += -std=gnu99 +# CFLAGS += -lm +## CFLAGS += -Wl,-u,vfprintf -lprintf_flt -lm ## for floating-point printf +## CFLAGS += -Wl,-u,vfprintf -lprintf_min ## for smaller printf + +## Lump target and extra source files together +TARGET = $(strip $(basename $(MAIN))) +SRC = $(TARGET).c +EXTRA_SOURCE = $(addprefix $(EXTRA_SOURCE_DIR), $(EXTRA_SOURCE_FILES)) +SRC += $(EXTRA_SOURCE) +SRC += $(LOCAL_SOURCE) + +## List of all header files +HEADERS = $(SRC:.c=.h) + +## For every .c file, compile an .o object file +OBJ = $(SRC:.c=.o) + +## Generic Makefile targets. (Only .hex file is necessary) +all: $(TARGET).hex size + +%.hex: %.elf + $(OBJCOPY) -R .eeprom -O ihex $< $@ + +%.elf: $(SRC) + $(CC) $(CFLAGS) $(SRC) --output $@ + +%.eeprom: %.elf + $(OBJCOPY) -j .eeprom --change-section-lma .eeprom=0 -O ihex $< $@ + +debug: + @echo + @echo "Source files:" $(SRC) + @echo "MCU, F_CPU, BAUD:" $(MCU), $(F_CPU), $(BAUD) + @echo + +# Optionally create listing file from .elf +# This creates approximate assembly-language equivalent of your code. +# Useful for debugging time-sensitive bits, +# or making sure the compiler does what you want. +disassemble: $(TARGET).lst + +dis: disassemble + +eeprom: $(TARGET).eeprom + +%.lst: %.elf + $(OBJDUMP) -S $< > $@ + +# Optionally show how big the resulting program is +size: $(TARGET).elf + $(AVRSIZE) -C --mcu=$(MCU) $(TARGET).elf + +clean: + rm -f $(TARGET).elf $(TARGET).hex $(TARGET).obj \ + $(TARGET).o $(TARGET).d $(TARGET).eep $(TARGET).lst \ + $(TARGET).lss $(TARGET).sym $(TARGET).map $(TARGET)~ \ + $(TARGET).eeprom + +squeaky_clean: + rm -f *.elf *.hex *.obj *.o *.d *.eep *.lst *.lss *.sym *.map *~ + + +##########------------------------------------------------------########## +########## Programmer-specific details ########## +########## Flashing code to AVR using avrdude ########## +##########------------------------------------------------------########## + +flash: $(TARGET).hex + $(AVRDUDE) -c $(PROGRAMMER_TYPE) -p $(MCU) $(PROGRAMMER_ARGS) -U flash:w:$< + +flash_eeprom: $(TARGET).eeprom + $(AVRDUDE) -c $(PROGRAMMER_TYPE) -p $(MCU) $(PROGRAMMER_ARGS) -U eeprom:w:$< + +terminal: + $(AVRDUDE) -c $(PROGRAMMER_TYPE) -p $(MCU) $(PROGRAMMER_ARGS) -nt + + +flash_dragon_isp: PROGRAMMER_TYPE = dragon_isp +flash_dragon_isp: PROGRAMMER_ARGS = +flash_dragon_isp: flash + + +##########------------------------------------------------------########## +########## Fuse settings and suitable defaults ########## +##########------------------------------------------------------########## + +## Generic +FUSE_STRING = -U lfuse:w:$(LFUSE):m -U hfuse:w:$(HFUSE):m -U efuse:w:$(EFUSE):m + +fuses: + $(AVRDUDE) -c $(PROGRAMMER_TYPE) -p $(MCU) \ + $(PROGRAMMER_ARGS) $(FUSE_STRING) +show_fuses: + $(AVRDUDE) -c $(PROGRAMMER_TYPE) -p $(MCU) $(PROGRAMMER_ARGS) -nv + +## Called with no extra definitions, sets to defaults +set_default_fuses: FUSE_STRING = -U lfuse:w:$(LFUSE):m -U hfuse:w:$(HFUSE):m -U efuse:w:$(EFUSE):m +set_default_fuses: fuses diff --git a/pov-led-globe/globe-timed-experimentalsd/image/README.txt b/pov-led-globe/globe-timed-experimentalsd/image/README.txt new file mode 100644 index 0000000..f34df8a --- /dev/null +++ b/pov-led-globe/globe-timed-experimentalsd/image/README.txt @@ -0,0 +1,47 @@ +How to generate image header file +================================= + +(intended for Linux - dunno how it works in Windoze) + + +1. Draw image in Gimp, with height a multiple of 8 (8, 16, 32... - how many + LEDs you have) + +2. Set collor mode to indexed (black & white) - and make sure WHITE is where + you want your leds to light up, black where you want dark. + +3. Export as C header file (eg. snowflake.h) + + +Now use the getbytes.py script to transform it: + + $ python3 getbytes.py snowflake.h + + #define ROWS 2 + #define COLS 15 + + const uint8_t image[COLS][ROWS] PROGMEM = { + { 0b00000001, 0b11000000 }, // ███ + { 0b00010000, 0b10000100 }, // █ █ █ + { 0b00111000, 0b10001110 }, // ███ █ ███ + { 0b00011101, 0b11001100 }, // ███ ███ ██ + { 0b00001100, 0b10011000 }, // ██ █ ██ + { 0b00000010, 0b10100000 }, // █ █ █ + { 0b01001001, 0b11001001 }, // █ █ ███ █ █ + { 0b11111111, 0b11111111 }, //████████████████ + { 0b01001001, 0b11001001 }, // █ █ ███ █ █ + { 0b00000010, 0b10100000 }, // █ █ █ + { 0b00001100, 0b10010000 }, // ██ █ █ + { 0b00011001, 0b11011100 }, // ██ ███ ███ + { 0b00111000, 0b10001110 }, // ███ █ ███ + { 0b00010000, 0b10000100 }, // █ █ █ + { 0b00000001, 0b11000000 }, // ███ + }; + +That will show you the transformed header file. + +To store it: + + $ python3 getbytes.py snowflake.h > ../image_snowflake.h + +Now, in your main.c file, just include it (remove the old image import). diff --git a/pov-led-globe/globe-timed-experimentalsd/image/aliensflip16.h b/pov-led-globe/globe-timed-experimentalsd/image/aliensflip16.h new file mode 100644 index 0000000..d5f559a --- /dev/null +++ b/pov-led-globe/globe-timed-experimentalsd/image/aliensflip16.h @@ -0,0 +1,321 @@ +/* GIMP header image file format (INDEXED): /home/ondra/devel/elektro/avr/projects/c/led-display/image/aliensflip16.h */ + +static unsigned int width = 42; +static unsigned int height = 16; + +/* Call this macro repeatedly. After each use, the pixel data can be extracted */ + +#define HEADER_PIXEL(data,pixel) {\ +pixel[0] = header_data_cmap[(unsigned char)data[0]][0]; \ +pixel[1] = header_data_cmap[(unsigned char)data[0]][1]; \ +pixel[2] = header_data_cmap[(unsigned char)data[0]][2]; \ +data ++; } + +static char header_data_cmap[256][3] = { + { 0, 0, 0}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255} + }; +static char header_data[] = { + 0,0,1,0,0,0,1,0,0,0,0,0,1,0,0,0, + 0,0,1,0,0,0,0,1,0,0,0,0,0,1,0,0, + 0,0,0,1,0,0,0,1,0,0, + 0,0,0,1,0,1,0,0,0,0,0,0,0,1,0,0, + 0,1,0,0,0,0,0,0,1,0,0,0,1,0,0,0, + 0,0,0,0,1,0,1,0,0,0, + 0,0,1,1,1,1,1,0,0,0,0,0,1,1,1,1, + 1,1,1,0,0,0,0,1,1,1,1,1,1,1,0,0, + 0,0,0,1,1,1,1,1,0,0, + 0,1,0,0,1,0,0,1,0,0,0,1,1,0,1,1, + 1,0,1,1,0,0,1,1,0,1,1,1,0,1,1,0, + 0,0,1,0,0,1,0,0,1,0, + 1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 0,1,1,1,1,1,1,1,1,1, + 1,0,1,1,1,1,1,0,1,0,1,0,1,1,1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new file mode 100644 index 0000000..c28118a --- /dev/null +++ b/pov-led-globe/globe-timed-experimentalsd/image/butt.h @@ -0,0 +1,321 @@ +/* GIMP header image file format (INDEXED): /home/ondra/devel/elektro/avr/projects/c/globus/image/butt.h */ + +static unsigned int width = 46; +static unsigned int height = 16; + +/* Call this macro repeatedly. After each use, the pixel data can be extracted */ + +#define HEADER_PIXEL(data,pixel) {\ +pixel[0] = header_data_cmap[(unsigned char)data[0]][0]; \ +pixel[1] = header_data_cmap[(unsigned char)data[0]][1]; \ +pixel[2] = header_data_cmap[(unsigned char)data[0]][2]; \ +data ++; } + +static char header_data_cmap[256][3] = { + { 0, 0, 0}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255} + }; +static char header_data[] = { + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 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,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, + 1,1,1,1,1,1,1,1,0,0,0,0,1,1,1,1, + 0,0,1,1,1,1,0,1,1,1,1,1,1,1,1,1, + 1,1,0,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,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0,0,0,0,0,0,0,0,0,0, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1 + }; diff --git a/pov-led-globe/globe-timed-experimentalsd/image/checker3264.h b/pov-led-globe/globe-timed-experimentalsd/image/checker3264.h new file mode 100644 index 0000000..1281b15 --- /dev/null +++ b/pov-led-globe/globe-timed-experimentalsd/image/checker3264.h @@ -0,0 +1,401 @@ +/* GIMP header image file format (INDEXED): /home/ondra/devel/avr/projects/c/led-display/image/checker3264.h */ + +static unsigned int width = 64; +static unsigned int height = 32; + +/* Call this macro repeatedly. After each use, the pixel data can be extracted */ + +#define HEADER_PIXEL(data,pixel) {\ +pixel[0] = header_data_cmap[(unsigned char)data[0]][0]; \ +pixel[1] = header_data_cmap[(unsigned char)data[0]][1]; \ +pixel[2] = header_data_cmap[(unsigned char)data[0]][2]; \ +data ++; } + +static char header_data_cmap[256][3] = { + { 0, 0, 0}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255} + }; +static char header_data[] = { + 0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1, + 0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1, + 0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1, + 0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1, + 0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1, + 0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1, + 0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1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,1,0,0,0,0,0,0,0,0 + }; diff --git a/pov-led-globe/globe-timed-experimentalsd/image/checker3264.xcf b/pov-led-globe/globe-timed-experimentalsd/image/checker3264.xcf new file mode 100644 index 0000000000000000000000000000000000000000..3bd511c5772d7da46d886dc71b7a5e7de3d8dcdc GIT binary patch literal 1134 zcmd^6+fIW(5M78Vwbh{U^5nz3n9v6d`~m3~_zRTFx{*S|Qqz8j|Kp$G8Qe7(@wpF9 zax#ZAb9R>*skS>hWF@^tQ7jM%K!6K4z{2pp@4>EFW%&k}uRmsw4Degv%;@)qbKf2M zACRvkE(+B)l|?99l|$m=9TDj6SQVt3O699XP|B>SnwEkgg{|DA6g@>lOpw@=Rn6Sf}oF3nUeDYkb(JWh#53-`6^NY&X(q1oS*r7pVf2eSLO^rif?@*GS!@0KAa z00BJHmO>EtX<|OHLZR?`tXai`g zse#bmhEQ*}zXOKO^Sf@GjuYGVwV+&VQmU>w8>ds7j^pb=&iHIN%m>qTgN**ET4~Cm zoP&})cm&x2TQFz3d)bX|l1VljyRmUIq$-$Z?qy3cN4~8X!f^ETA#sx)?-uZ00q+-Z z4VZa7MF2kDuiN(mQ*fn@9Y_mCFF_xY)B#(Zr;sKxkrX*FAA8(ai;E zD{9kIg{9%jPQ_H@jeQ7(CSd0%7Jl`rk?-_0Ppb>KAkEAc+|_6*SLfw593{UREB9L* zab#+xk(X`db^M2|_HE_=QRDZVf4#eV1z~A`TmT;yzTlgI&(eKABk%&MCGW_50&wb% A)&Kwi literal 0 HcmV?d00001 diff --git a/pov-led-globe/globe-timed-experimentalsd/image/getbytes.py b/pov-led-globe/globe-timed-experimentalsd/image/getbytes.py new file mode 100755 index 0000000..0e72a34 --- /dev/null +++ b/pov-led-globe/globe-timed-experimentalsd/image/getbytes.py @@ -0,0 +1,73 @@ +#!/bin/env python3 + +import sys +import re + +file = open(sys.argv[1], 'r') + +src = file.read() + +matches = re.search(r'static unsigned int width = (\d*);', src) +width = int(matches.groups(1)[0]) + +matches = re.search(r'static unsigned int height = (\d*);', src) +height = int(matches.groups(1)[0]) + + +matches = re.search(r'static char header_data_cmap\[\d+\]\[\d+\] = \{\n\s*(\{.*?\}),\s*(\{.*?\})', src, flags=re.S) +s = matches.groups(1)[0] +t = matches.groups(1)[1] + +if s == '{255,255,255}' and t == '{ 0, 0, 0}': + inverted=True +elif s == '{ 0, 0, 0}' and t == '{255,255,255}': + inverted=False +else: + raise Exception('Wrong colors') + + + + +matches = re.search(r'static char header_data\[\] = \{(.*?)\};', src, flags=re.S) +s = matches.groups(1)[0] + +# clean up - leave only numbers +s = re.sub(r'[\s,]', '', s).strip() + +s = [s[x:x+width] for x in range(0,width*height,width)] + +cols = [''.join(i) for i in zip(*s)] + +bc = 0 + +print(""" +#define ROWS {r} +#define COLS {c} + +const uint8_t image[COLS][ROWS] PROGMEM = {{""".format(r=int(height/8), c=width)) + +for c in cols: + + # convert colors based on pallete + if inverted: + c=c.translate({ + ord('0'): ord('1'), + ord('1'): ord('0') + }) + + + bytz = ['0b{}'.format(c[x:x+8]) for x in range(0,len(c),8)] + + print('\t{ ', end="") + + print(', '.join(bytz), end="") + + print(' }, //', end="") + + print(c.translate({ + ord('0'): ord(' '), + ord('1'): ord('█') + })) + +print('};\n') + diff --git a/pov-led-globe/globe-timed-experimentalsd/image/globus.h b/pov-led-globe/globe-timed-experimentalsd/image/globus.h new file mode 100644 index 0000000..f60bbb6 --- /dev/null +++ b/pov-led-globe/globe-timed-experimentalsd/image/globus.h @@ -0,0 +1,401 @@ +/* GIMP header image file format (INDEXED): /home/ondra/devel/elektro/avr/projects/c/led-display/image/globus.h */ + +static unsigned int width = 58; +static unsigned int height = 32; + +/* Call this macro repeatedly. After each use, the pixel data can be extracted */ + +#define HEADER_PIXEL(data,pixel) {\ +pixel[0] = header_data_cmap[(unsigned char)data[0]][0]; \ +pixel[1] = header_data_cmap[(unsigned char)data[0]][1]; \ +pixel[2] = header_data_cmap[(unsigned char)data[0]][2]; \ +data ++; } + +static char header_data_cmap[256][3] = { + { 0, 0, 0}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255} + }; +static char header_data[] = { + 0,0,0,0,0,0,0,0,1,0,0,1,1,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,1,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,1,0,0,0,0,1,1,1,1,0,0,0, + 0,1,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,1,1,1,0,1,0,1,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,1,0,0,0,0,1,1,1,1,1,0,0,0, + 0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,1,0,0,1,1,1,1,1,1,1,1,1,1, + 1,1,1,0,0,0,0,0,0,0, + 0,1,1,1,1,0,1,1,1,1,1,0,1,1,1,1, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1, + 0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,0,1,0,0,0, + 0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1, + 1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,0, + 0,1,1,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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,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0 + }; diff --git a/pov-led-globe/globe-timed-experimentalsd/image/globus.xcf b/pov-led-globe/globe-timed-experimentalsd/image/globus.xcf new file mode 100644 index 0000000000000000000000000000000000000000..2367793a402165f94f62d6f782fc81bda81429d7 GIT binary patch literal 1058 zcmZ`%%Wm306uox<+t|?11cO4WYBrU~f(Wvq>axF)6%XTBG8kdnl2yK<|I_cvi=I2o zR79mC9p5u&?#p*3&6aDun=SN@;c!G)UjYp$fPv8R{eBPjUR04UfZ*G2@3R2B4OD>& z(6L#jp6Ig3v-wrnU!=1lFE+Yw%wUsFCwh22 zH0uNz*`q6jPEUlobNzoJp}TTDnPsa~k6bN?_oqaw4Zg3ktDMiX zA-M(dktLVvcyz=YN4$B&&%hOuBCJ<2O!boa`5 zL^Y0uD5`KpNRt#l;gv8RoYAX%K|b&-VG;Xqd?hv?#Z6?YP>WySuc*P#k~yRg_}Wd? zc=T9NByr4gsz9*u;HDs$&G{iXfS)gwna<${Qb#I}y8Mnp4yXfLH?~EdiB)hsGyKpw zal`b}LT;7>0ma-#kqC)UwZ>g+LexPKgC4yY>LIfkf(h$Um20LJ^Cj~8*aygInrdSv u9t3Ir5<~QX2!~y0G9npB0IdTa01*0UX@zmVLsrep70|7hqt`H@>1y}3!8Uc0$m!#jr zo1gE5pu>*gHTWs~#ADWdK>ZowVTO%*c0A0IUN*B=px9oDPEpQBi7E1tz3R3)X%^?B zd}cZ>^k&)R&_w;n*$y!9sV=0KJES3RUIvuj7SmyDCz%<9y+F=)k)G>)o7mFWNqn6Y z)aPkhB<0fqseVpX%(j&G;7#6FK!5T?7zOWj|GfXPAD#D0o2E>2JhVMH^PEr9W8V84 zj}Zj#pEWd&GvK!ycz*-G+rVvL_6^nm2>LMda2BN0g)a+r7augNHhOPf#3mtk?kw+vSm#5SC<{I0i~PNqXu*M{;lm-k_69pMwyiIwhFFw39qRues$}`evOrgnr*j z0y?ETv)1mn|0|7MeZRC1)0zD?8jTgm1~xb~xBye$ZnyZp18c%(;QabYDKh9BoPtlm z?}JRg3;2J;`Q~m}xw5U+>w4i@06uy0DN)8~5RkVH&6M^1#8stR)wjV*t6{r-oL9DO z=JoAmF`T(+GjCRQC`Y++HxoO$8VMZ{#=&%n(3>Nn(Qf}QF!Z5aPNrzyj$%*&2)_dxC)$o&I(0GW9soj{23@kQ|Q1Tu2*P;6lIV!j7sz|1rC zt~$|YD%F`v^gtQi1^4jsI;w-GqIDtiPsH=(=v3zd@EyHsl|Xr+CBw%E|E8N5sHcJ@ z@bI`n8SjU;2pc^0M*O{<80`tOr@jOvDMp-j78R4BJtE?=hj+G&l@Z5ID2PEm9NA!e z*n|y6_qD@x28Lapef~U7&UAY?4I}zO9FOTU@4*_(Ph+Nb>*OE_09j?6lWDn6?nMUD z4DdG~?WF2g)Yt$NQDre)4ioq#Bc)Lr>V6Q9dJm$~3jDc6s0`-N_*DS(H|0AHi)Kq5 kIFV&u)?)YUmoI~nuQ> 4)); \ +pixel[1] = ((((data[1] - 33) & 0xF) << 4) | ((data[2] - 33) >> 2)); \ +pixel[2] = ((((data[2] - 33) & 0x3) << 6) | ((data[3] - 33))); \ +data += 4; \ +} +static char *header_data = + "````````````!!!!!!!!!!!!!!!!````!!!!````!!!!!!!!!!!!!!!!!!!!!!!!" + "````!!!!````!!!!!!!!!!!!````!!!!````!!!!````!!!!!!!!!!!!!!!!!!!!" + "````!!!!!!!!!!!!!!!!!!!!````!!!!````!!!!````!!!!!!!!!!!!!!!!!!!!" + "````````````````````````````````````````````````!!!!!!!!!!!!!!!!" + "!!!!!!!!````````````````!!!!!!!!!!!!!!!!!!!!````!!!!!!!!!!!!!!!!" + "!!!!!!!!````````!!!!!!!!!!!!````````!!!!!!!!!!!!````````````!!!!" + "!!!!!!!!````!!!!!!!!!!!!!!!!````````!!!!!!!!````!!!!!!!!!!!!````" + "!!!!!!!!````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!````!!!!````!!!!````" + "!!!!!!!!````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!````!!!!!!!!!!!!````" + "!!!!!!!!````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!````!!!!!!!!!!!!````" + "!!!!!!!!````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!````!!!!````!!!!````" + "!!!!!!!!````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!````!!!!!!!!!!!!````" + "!!!!!!!!````````````````````````````````````````````````````!!!!" + "!!!!!!!!````!!!!````!!!!````!!!!!!!!````!!!!!!!!!!!!!!!!!!!!!!!!" + "!!!!!!!!````!!!!````!!!!````!!!!!!!!````!!!!!!!!!!!!!!!!!!!!!!!!" + "!!!!````````!!!!````!!!!````````!!!!````````!!!!!!!!!!!!!!!!!!!!" + ""; diff --git a/pov-led-globe/globe-timed-experimentalsd/image/pig16.xcf b/pov-led-globe/globe-timed-experimentalsd/image/pig16.xcf new file mode 100644 index 0000000000000000000000000000000000000000..5dc9322f7eefa0f0512576fef32cdaefc19b6f2f GIT binary patch literal 1180 zcmeHFO;5r=5S?v{BGriT3f%H<}FWtpdXHtY=&73FDO$U&8YLQO+CdKgu4gp6%#h|%eh(Yh~x zCp@|?7h$9`CCBxGs}^Pt>-fwJ)q`(gP%9}MT1|0^SyPPg4FZP&u#n8 zqb2p~F8&QqZOxf-?HHFn4fghSNzgl2hFtpM$G-AShg{>a>X9%`1qT@d7lMhP4>(|8 k$98v1#aoS5ac~N&knwSAv-86{c+r;EtA6hP_J8R8H;#xpZ2$lO literal 0 HcmV?d00001 diff --git a/pov-led-globe/globe-timed-experimentalsd/image/snowflake.h b/pov-led-globe/globe-timed-experimentalsd/image/snowflake.h new file mode 100644 index 0000000..a740627 --- /dev/null +++ b/pov-led-globe/globe-timed-experimentalsd/image/snowflake.h @@ -0,0 +1,289 @@ +/* GIMP header image file format (INDEXED): /home/ondra/devel/elektro/avr/projects/c/globus/image/snowflake.h */ + +static unsigned int width = 15; +static unsigned int height = 16; + +/* Call this macro repeatedly. After each use, the pixel data can be extracted */ + +#define HEADER_PIXEL(data,pixel) {\ +pixel[0] = header_data_cmap[(unsigned char)data[0]][0]; \ +pixel[1] = header_data_cmap[(unsigned char)data[0]][1]; \ +pixel[2] = header_data_cmap[(unsigned char)data[0]][2]; \ +data ++; } + +static char header_data_cmap[256][3] = { + { 0, 0, 0}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255} + }; +static char header_data[] = { + 0,0,0,0,0,0,0,1,0,0,0,0,0,0,0, + 0,0,0,0,0,0,1,1,1,0,0,0,0,0,0, + 0,0,1,0,0,0,0,1,0,0,0,0,1,0,0, + 0,1,1,1,0,0,0,1,0,0,0,1,1,1,0, + 0,0,1,1,1,0,1,1,1,0,1,1,1,0,0, + 0,0,0,1,1,0,0,1,0,0,1,0,0,0,0, + 0,0,0,0,0,1,0,1,0,1,0,0,0,0,0, + 1,0,0,1,0,0,1,1,1,0,0,1,0,0,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,0,0,1,0,0,1,1,1,0,0,1,0,0,1, + 0,0,0,0,0,1,0,1,0,1,0,0,0,0,0, + 0,0,0,0,1,0,0,1,0,0,1,1,0,0,0, + 0,0,1,1,1,0,1,1,1,0,0,1,1,0,0, + 0,1,1,1,0,0,0,1,0,0,0,1,1,1,0, + 0,0,1,0,0,0,0,1,0,0,0,0,1,0,0, + 0,0,0,0,0,0,1,1,1,0,0,0,0,0,0 + }; diff --git a/pov-led-globe/globe-timed-experimentalsd/image/snowflake.xcf b/pov-led-globe/globe-timed-experimentalsd/image/snowflake.xcf new file mode 100644 index 0000000000000000000000000000000000000000..7d3b9d43fa3bf7bfdbad920ba95a253e1a1a0f9f GIT binary patch literal 849 zcmZ{iT~5M45XW~5QUnS3`Q*bs!b45D0zMEQOuRxVW!Xqu(iVky2)%(<@m9uh;v&b7!!U?4ob%o%*Gb@I!B{-1Y$}E~w|5lj-85Ux z0+GfuHSRUK6Y0mZI1%04IEfs2!o6~H*#mtY>Y;SBr_{v7|3Ib7bnf{olA>?!f^)Uc zseR5OQkhVZKMhi z%`t(+Z31ie0rUK{1&gooTW&v9BKC!roZ0M?!*Et%AGw2KoP86w4g988OuEh9O*%?- Qcl5!XrF%;=)et*iKQj+}f&c&j literal 0 HcmV?d00001 diff --git a/pov-led-globe/globe-timed-experimentalsd/image/some-aliens.xcf b/pov-led-globe/globe-timed-experimentalsd/image/some-aliens.xcf new file mode 100644 index 0000000000000000000000000000000000000000..52d104d81b149ea138b76d153f141474aadfd8c0 GIT binary patch literal 1057 zcmZ`%*-pYh6rJ0J#U)}ypM2&B1qHYX2_O~7nZ>j_ zh5b3sMuLkv>HQ!XcanKJ0>$v6TKVF6I*#&envU9gtw|DR(`+8K^wF6o!$H)&>gu%v z^sK54*WnIVr;q*zbY12TgE*ZfQP154@_83&xz6J(T}0_Dz8&ZE&nA<6yeJZ+_g~5| z+pg?`UGm}(PB#YjbiY4{?~-};IMZ$8WVqOBsyUaM#cX-qVjPOCrwtb;>F|CDAC&N6 z2_FG7u3J?A=kLbta)HXbv4$>nFCId8##QEM@qPoy`mK>Amk_-aMFurLn_6dIMU z0tr+_d`JN7sSo|A;Dt}t5P8=R7LOKqMJ(#QFsjm~$*soCmoMWQ%C|NR9icTkDz7k~ zuRZ~Y{a;c{X7&i7*Ovwk*vzk$Csjzp)fh;K0xIRYidsr#v0`6+xddG4mJr(qhGJjd eOnNrUB5@thgrMrf)FXH~7)PkSb$fK%>*@#a1C71_ literal 0 HcmV?d00001 diff --git a/pov-led-globe/globe-timed-experimentalsd/image/test_narrow.h b/pov-led-globe/globe-timed-experimentalsd/image/test_narrow.h new file mode 100644 index 0000000..ec6ba1b --- /dev/null +++ b/pov-led-globe/globe-timed-experimentalsd/image/test_narrow.h @@ -0,0 +1,289 @@ +/* GIMP header image file format (INDEXED): /home/ondra/devel/avr/projects/c/led-display/image/test_narrow.h */ + +static unsigned int width = 4; +static unsigned int height = 16; + +/* Call this macro repeatedly. After each use, the pixel data can be extracted */ + +#define HEADER_PIXEL(data,pixel) {\ +pixel[0] = header_data_cmap[(unsigned char)data[0]][0]; \ +pixel[1] = header_data_cmap[(unsigned char)data[0]][1]; \ +pixel[2] = header_data_cmap[(unsigned char)data[0]][2]; \ +data ++; } + +static char header_data_cmap[256][3] = { + { 0, 0, 0}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255} + }; +static char header_data[] = { + 1,1,0,0, + 0,0,0,0, + 1,1,0,0, + 0,0,0,0, + 1,1,0,0, + 0,0,0,0, + 1,1,1,0, + 0,1,1,0, + 0,1,1,0, + 0,1,1,1, + 0,0,0,0, + 0,0,1,1, + 0,0,0,0, + 0,0,1,1, + 0,0,0,0, + 0,0,1,1 + }; diff --git a/pov-led-globe/globe-timed-experimentalsd/image/test_narrow.xcf b/pov-led-globe/globe-timed-experimentalsd/image/test_narrow.xcf new file mode 100644 index 0000000000000000000000000000000000000000..35edc442901fd220a23a848c127a7fc2d2739582 GIT binary patch literal 838 zcma)4O;3YB5QRl+ZPnKJaq_Si6MDeV#Jfr3)sy}KN@2Sxg$AghCx3?*e~bSN=h4}Q z#+o?E%Rb)B+Z|?C>E%jRVJzQ$e{4}45rzaoun9fpbzKv?gbMkJ(4BmD?g8T01Xy9a zWsbTVs=uRksOTV1F9Q{MD%UfTu)S@$MY%~LS!9Wxje2gZ!Ys*h={Ad(t7#zp2fv8} zWX!1%S*HiACNKXcuvWz?2z9FD*qlY;=8(vmw@!5_bsEm20{$$Hi>TZ+2={MktL$4b z2M+slOT-ro<|?rECqcMSdA3fQ(P7Mp4gqQ0O_w>we#)E{3*$!(0=H>+zs1j5{Jg~n z#Idi56C%dnzH-isHzugTE23V+d|wk4zHR$>2SG2&W{8&FJT$Y@;5AC3u+&*9UxH$R qJxn8J2p^>VX9ySU#h}onL!dDK1DV5-L`(;yJCB@T&3VT6Q~d*aHD+i4 literal 0 HcmV?d00001 diff --git a/pov-led-globe/globe-timed-experimentalsd/image/test_wide.h b/pov-led-globe/globe-timed-experimentalsd/image/test_wide.h new file mode 100644 index 0000000..c9b98b6 --- /dev/null +++ b/pov-led-globe/globe-timed-experimentalsd/image/test_wide.h @@ -0,0 +1,305 @@ +/* GIMP header image file format (INDEXED): /home/ondra/devel/avr/projects/c/led-display/image/test_wide.h */ + +static unsigned int width = 32; +static unsigned int height = 16; + +/* Call this macro repeatedly. After each use, the pixel data can be extracted */ + +#define HEADER_PIXEL(data,pixel) {\ +pixel[0] = header_data_cmap[(unsigned char)data[0]][0]; \ +pixel[1] = header_data_cmap[(unsigned char)data[0]][1]; \ +pixel[2] = header_data_cmap[(unsigned char)data[0]][2]; \ +data ++; } + +static char header_data_cmap[256][3] = { + { 0, 0, 0}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255}, + {255,255,255} + }; +static char header_data[] = { + 1,1,1,1,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, + 1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0, + 1,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0, + 0,0,0,0,0,1,0,1,0,0,0,0,1,0,0,1, + 1,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0, + 0,1,0,1,0,1,0,1,0,1,1,0,1,0,0,0, + 1,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0, + 0,1,0,1,0,1,0,1,0,1,1,0,1,0,0,0, + 1,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0, + 0,0,0,0,0,1,0,1,0,0,0,0,1,0,0,1, + 1,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1, + 0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0, + 1,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1, + 1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1, + 1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,1, + 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0, + 1,0,1,1,1,1,1,0,1,0,0,0,0,0,0,0, + 0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0, + 1,0,1,0,0,0,1,0,1,0,1,0,0,0,0,0, + 0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,1, + 1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0, + 0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0, + 1,0,1,0,0,0,1,0,1,0,1,0,0,0,0,0, + 0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0, + 1,0,1,1,1,1,1,0,1,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1, + 1,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,1,1,1,1 + }; diff --git a/pov-led-globe/globe-timed-experimentalsd/image/test_wide.xcf b/pov-led-globe/globe-timed-experimentalsd/image/test_wide.xcf new file mode 100644 index 0000000000000000000000000000000000000000..ea5a6573e348bef87502f7640d9790b1eb479dc7 GIT binary patch literal 1040 zcma)4%TB^j5WTl8Zv~8xg}S&K6Ifv27udVfA1I|Q4bT#b23LHCf8*!4HSP?E=d`z^ zC?-yGn8TSnGq*GKgXv5y9Zx-VyFCF@Koc+k2~;)TZnt13R4JbV<^F5&h5$bUEP!bj zn)BQ_&R@efeKhI>Q`>ht{yZ2$VtFZA@#1;nsyLbi!*;dh`A#&6=Bkyr&fFi^s(af_ z>;UQMP#dX(1F2bD{Y{vcD@lJ-ZqSCOOX)o%@4<(f zg|qMJHFm%3X8t(Kx-wU +#include +#include +#include +#include +#include + +#include "utils.h" + +// Change to the image you want: +#include "image_chk3264numbers.h" + +#define DEBOUNCE_MS 3 + + +/** + * +--u--+ + * RST --| |-- Vcc + * TRIGGER : PB3 --| t13 |-- PB2 : CLOCK -> + * N.C. : PB4 --| |-- PB1 : STROBE -> to chained 74HC4094's + * GND --| |-- PB0 : DATA -> + * +-----+ + * + * TRIGGER is connected to ground by spring switch + * that gets activated at start of swing to right. + * (It's a metal contact with weight) + * + * LEDs are connected to 74HC4094 outputs by anodes. + * To use cathodes, invert byte in send_byte function. + */ + + + +// pins config +#define PIN_DATA PB0 +#define PIN_STROBE PB1 +#define PIN_CLOCK PB2 +#define PIN_TRIGGER PB3 + + +#define trigger_on() (0 == get_bit(PINB, PIN_TRIGGER)) + + + +/** Measure counter 10 usec */ +volatile uint16_t measure_counter; + +volatile uint8_t waiting_for_trigger = 1; + +/** Computed pixel timing */ +uint16_t t_light = 50; // 5 ms +uint16_t t_gap = 10; // 1 ms + + +void measure_start(void); +void measure_stop(void); +void send_byte(uint8_t); +void display(void); +int main(void); + +/** Initialize IO ports. */ +// void init_io(void) ; + +void SECTION(".init8") init_io(void) +{ + // set output pins + DDRB = _BV(PIN_DATA) | _BV(PIN_STROBE) | _BV(PIN_CLOCK); + + // pullups + PORTB = _BV(PIN_TRIGGER); + + // initialize the timer + + TCCR0B = _BV(CS00); // prescaler 0 + OCR0A = 96; // interrupt every 10 us + sbi(TIMSK0, OCIE0A); + + // initialize external interrupt + + PCMSK = _BV(PCINT3); + sbi(GIMSK, PCIE); // pin change interrupt enable +} + + +/** timer 0 interrupt vector */ +ISR(PCINT0_vect) +{ + if (waiting_for_trigger && trigger_on()) { + measure_stop(); + } +} + + +/** timer 0 interrupt vector */ +ISR(TIM0_COMPA_vect) +{ + // increment only if not too high + if (waiting_for_trigger && measure_counter < 0xFFFF) { + measure_counter++; + } +} + + + +/** Start counting time of interval */ +void +measure_start() +{ + measure_counter = 0; // reset the counter + waiting_for_trigger = 1; // start waiting for trigger -> stop. + + // enable CompMatch A interrupt +} + + +/** Stop measuring, compute timing values */ +void +measure_stop() +{ + uint16_t prec = (measure_counter / (COLS)); + t_light = ((prec*7)/100); + t_gap = ((prec*3)/100); + + // if (t_light == 0) t_light=25; + // if (t_gap == 0) t_gap=5; + + waiting_for_trigger = 0; // stop waiting for trigger (new loop may start) +} + + + + + +/** send one byte into registers */ +void +send_byte(uint8_t b) +{ + for (uint8_t i=0; i<8; i++) { + set_bit(PORTB, PIN_DATA, get_bit(b, i)); + + bus_pulse(PORTB, PIN_CLOCK); // strobe + } +} + + +/** send STROBE pulse */ +void +display() +{ + bus_pulse(PORTB, PIN_STROBE); +} + + +/** + * Main function + */ +int +main() +{ + sei(); + + while (1) { + + // while (waiting_for_trigger); // wait for interrupt on TRIGGER + // _delay_ms(DEBOUNCE_MS); // debounce + // while (trigger_on()); // wait for trigger to turn off + // _delay_ms(DEBOUNCE_MS); // debounce + // measure_start(); + + for(uint8_t i = DEBOUNCE_MS; i > 0; i--) { + while (trigger_on()); + _delay_ms(1); + } + measure_start(); + + for (uint8_t col = 0; col < COLS; col++) { + + if(trigger_on()) break; // emergency exit + + // +++ light +++ + + // send light values + for(uint8_t row = ROWS; row > 0; row--) { + send_byte(pgm_read_byte(&image[col][row-1])); + } + + // send STROBE + display(); + + // Wait + for(uint16_t i = t_light; i > 0; i--) { + _delay_us(100); + } + + + // +++ dark +++ + + // send zeros + for(uint8_t row = ROWS; row > 0; row--) { + send_byte(0); + } + + // send STROBE + display(); + + // Wait + for(uint16_t i = t_gap; i > 0; i--) { + _delay_us(100); + } + } + } +} diff --git a/pov-led-globe/globe-timed-experimentalsd/test_narrow16.h b/pov-led-globe/globe-timed-experimentalsd/test_narrow16.h new file mode 100644 index 0000000..a2c835e --- /dev/null +++ b/pov-led-globe/globe-timed-experimentalsd/test_narrow16.h @@ -0,0 +1,11 @@ + +#define ROWS 2 +#define COLS 4 + +const uint8_t image[COLS][ROWS] PROGMEM = { + { 0b10101010, 0b00000000 }, //█ █ █ █ + { 0b10101011, 0b11000000 }, //█ █ █ ████ + { 0b00000011, 0b11010101 }, // ████ █ █ █ + { 0b00000000, 0b01010101 }, // █ █ █ █ +}; + diff --git a/pov-led-globe/globe-timed-experimentalsd/utils.h b/pov-led-globe/globe-timed-experimentalsd/utils.h new file mode 100644 index 0000000..4ab82a1 --- /dev/null +++ b/pov-led-globe/globe-timed-experimentalsd/utils.h @@ -0,0 +1,14 @@ +#pragma once + +// general macros +#define SECTION(pos) __attribute__((naked, used, section(pos))) + + +// pin manipulation +#define sbi(port, bit) (port) |= _BV(bit) +#define cbi(port, bit) (port) &= ~ _BV(bit) + +#define set_bit(port, bit, value) (port) = (((port) & ~_BV(bit)) | ((value) << (bit))) +#define get_bit(port, bit) (((port) >> (bit)) & 1) + +#define bus_pulse(port, bit) { sbi(port, bit); cbi(port, bit); }