Mindblowing Graphics From An ATtiny85

[Görg Pflug] wrote in with his really nice graphics library. It’s got multiple layers, two text consoles, greyscale, internal halftoning, and sprites. It can pull off a number of classic graphics tricks and demos. Oh yeah, and did we mention it runs on a freaking ATtiny85 and an I2C OLED screen?!

This is an amazing piece of work — if you’d asked us if this was possible, we would have probably said “no”. And now it’s yours to use in your own projects. The GitHub repo is full of demos showing off everything from switching between multiple layers, extremely rapid text scrolls, animations, boing balls, and even a Wolfenstein-style raycaster. On an ATtiny85.

There’s a demo video, embedded below, that shows it all off, but honestly you have to think about what’s going to to be suitably wowed. The first demo just seems to have a graphic wave over static text, for instance. No big deal? It’s blending the greyscale layers together and dithering them out to black and white for the OLED in real time! On an ATtiny85.

While the library is written in straight C++, there are even a couple examples of how you’d integrate this with Arduino’s Wire library if you so wished. We don’t know about you, but this makes us want to whip together an ATtiny85 and SSD1306 OLED demo board just to start playing around. This isn’t just an amazing hack, but it would also be a useful way to add graphics and a nice console to any project you’re working on.

Did we mention it’s all done on an ATtiny85?  Over I2C? Kudos!

24 thoughts on “Mindblowing Graphics From An ATtiny85

      1. Why cant both be impressive for different reasons? It’s not a competition where only one can win, and dismissing this just because of program size or clock speed without even considering the strict constraints enforced by the attiny architecture is doing the author of the above project a great disservice.

        1. Agree – It’s impressive! There’s always someone with a “this one is better, this one was first” comment. Who cares. Let’s just see cool stuff like this and acknolwedge there’s other out there who have done similar! Sharing is caring.

      2. Without knocking the work done here, Its not as impressive as it looks at 1st value.. the at tiny runs at 20mhz and most instructions operate in a single cycle, older processors like the 6502 take between 2 and 6 cycles per instruction.. so at worse case the attiny is 10x faster, and at best case its 30x faster than a 6502.. if you put it against what top notch programming is like on a stripped down processor, look at games produced for the atari 2600 (VCS), they were done on a 6507 with something like 128 bytes of ram..

        1. I’d bet the atari has dedicated video hw that the attiny doesn’t, which has to waste many clock cycles double buffering the display data and bitbanging the serial ssd1306 video interface. Different architectures between the two, so you cant just look at clock speed and write off the faster one.

    1. Actually memory usage is pretty low, the diagram example requires 68 Bytes Stack, and 29 Bytes of static Data, the “wolfenstein” 90 bytes Stack, and about 64 bytes static Data. the spinning cube and the crossfader are the most resource hungry demos, that should be about 280 static data and about 70 bytes stack for the crossfader.

  1. Hullo guys, thanks for article and also commentary by sjm4306, agree totally.

    Btw. I’ve had to change my email address as my ISP going through domain rationalisation next two weeks.
    I used my new email address to post (positive) reply to sjm4306 and seems to have been ignored likely because hackaday hasn’t seen that new email address before, though I tried again with same result my replies not saved :-/

    So how do I change email address on my hackaday list of many article alerts whilst saving earlier subscriptions ?

    The new email address only shows one article alert subscription, yet my post not present :-(

    1. I’ve seen some work on that on the Arduboy forums and iirc the general consensus seemed to be that it’s possible but made more difficult by the frame sync signal not being brought out of the ssd1306 controller. I think I remember someone went so far as to partially decap the controller and attach a wire to the bare flip chip to access the signal.

Leave a Reply to MyselfCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.