Some old AVR projects
您最多能選擇 25 個主題 主題必須以字母或數字為開頭,可包含連接號「-」且最長為 35 個字元。
 
 
 
 
 
 
Ondřej Hruška dbdcefea38 Cleanup, reorganization 11 年前
..
README.txt Cleanup, reorganization 11 年前
aliensflip16.h Cleanup, reorganization 11 年前
butt.h Cleanup, reorganization 11 年前
checker3264.h Cleanup, reorganization 11 年前
checker3264.xcf Cleanup, reorganization 11 年前
checker3264numbers.h Cleanup, reorganization 11 年前
checker3264numbers.xcf Cleanup, reorganization 11 年前
getbytes.py Cleanup, reorganization 11 年前
globus.h Cleanup, reorganization 11 年前
globus.xcf Cleanup, reorganization 11 年前
logo16.h Cleanup, reorganization 11 年前
logo16.xcf Cleanup, reorganization 11 年前
logo32.h Cleanup, reorganization 11 年前
logo32.xcf Cleanup, reorganization 11 年前
pig.h Cleanup, reorganization 11 年前
pig16.h Cleanup, reorganization 11 年前
pig16.xcf Cleanup, reorganization 11 年前
snowflake.h Cleanup, reorganization 11 年前
snowflake.xcf Cleanup, reorganization 11 年前
some-aliens.xcf Cleanup, reorganization 11 年前
test_narrow.h Cleanup, reorganization 11 年前
test_narrow.xcf Cleanup, reorganization 11 年前
test_wide.h Cleanup, reorganization 11 年前
test_wide.xcf Cleanup, reorganization 11 年前

README.txt

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).