GithubHelp home page GithubHelp logo

tinymatrix's Introduction

TinyMatrix

TinyMatrix is a project by TigerUp and can be found here.

I just modified it a little bit - made it a little bit smaller so people can add their own pictures or animations and still have it run on an ATtiny2313.

I also added a script that generates the required hex sequences from ASCII art files.

How to make your own Tinymatrix

You need on the hardware side:

  • ATtiny2313 or ATtiny4313

  • a LED matrix (LTP-747 or -757 series)

  • a resistor (47k works nicely)

  • a pushbutton

  • a con cell and coin cell holder

  • a programmer, avr-gcc, avrdude

Now follow the instructions on the original TinyMatrix site.

How to modify the source code to add your own pictures or animations

Do the below (whatever you want and need), but keep in mind that the storage on the ATtiny2313 is very limited - you have got about 200 Bytes to do what you want if you want to keep all animations and pictures that are on there now.

When you are done, do a make clean && make && sudo make flash (you might have to modify the makefile to work with your operating system).

How to add static pictures

Write an ASCII file with the image you want. # signifies a lit LED. Take care to have at least five characters in every row, else the image generator will not work as expected. Save the file(s) with the extension .pixx in the img-generator folder.

From that folder, call generate.py. Note: Python 3 is required to execute this script.

Copy the output lines into the array that is const unsigned char charset[CHARS][5] PROGMEM around line 77 in src/main.c. A line above that, modify define CHARS 15 to represent the new size of the array.

Continue at "How to change the image order" or else your image will not appear.

How to add animations

Have a look at the render_*() functions in src/main.c and build one like it. bitmap[a][b] refers to the dot matrix, render_character(i) renders the image found at position i in the charset array, clear_bitmap() does exactly that.

Continue at "How to change the image order" or else your animation will not appear.

How to change the image order

Change it around int the render_buffer() function. You can either call a function or render an image by calling render_character(i) which renders the image at index i of the charset array.

Adjust the define MODES statement to include the new number of modes.

To change the very first animation/image, change the mode variable in the init() function.

tinymatrix's People

Contributors

rashfael avatar rixx avatar armin-bauer avatar

Stargazers

 avatar Mike T avatar  avatar

Watchers

 avatar James Cloos avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.