Close
0%
0%

AttinyRGB

A transitioning RGB LED, powered by the mighty Attiny85!

Similar projects worth following
It's a transitioing RGB LED, powered by an Attiny85 (using my T85 Target board.) Great for Christmas decorations.

It's a common anode RGB LED light that transitions between several colors. I'm using my T85 Target board. Information of the board can be found here which includes all the details about it plus links to the gihub page for the board file if you want to make your own.

This project uses the AVR-GCC toolchain. The compiled hex program is under 1 kB in size as required for entry into the HaH 1kB challenge. I verified this using the avr-size command.

hex - 1.30 kB - 11/23/2016 at 16:29

Download

makefile - 685.00 bytes - 11/23/2016 at 16:29

Download

plain - 1.51 kB - 11/23/2016 at 16:28

Download

  • 1 × T85 Target board Link to this can be found in project details
  • 3 × 220 Ohm 1/4 watt resistors
  • 1 × Breadboard Electronic Components / Misc. Electronic Components
  • 1 × Common Anode 5mm RGB LED
  • 8 × Jumper wires

  • AttinyRGB demo

    mcu_nerd12/09/2016 at 21:39 0 comments

    Sorry about the delay, I've been busy for these past few weeks with various activities including configuring a new laptop. Anyways I got a chance this afternoon to take a video of it. Sorry about it not exactly being 1080p but I don't own any "newish" camcorders (the one I used was a hand-me-down from a relative.) I will probably do another video next week from a better angle, the video sadly comes nowhere close to doing it justice.

  • It begins, or rather it continues

    mcu_nerd11/23/2016 at 16:48 0 comments

    Let me start off by first saying that this project didn't exactly originate a few days ago, it actually started last year around Christmas when I wanted to find a way to give some light to a Nativity scene. I came up with lighting it with an RGB LED. I whipped something up under the Arduino IDE that would rotate between colors. It looked nice, but I later decided to make the transitions between colors smooth, so I made a second, much improved revision.

    When I read about the HaD 1 kB challenge, I remembered my neat RGB LED transition program and knew that I could easily redo it under AVR-GCC to get it well below 1 kB. The one that I did (second revision) under the Arduino compiled to 1,402 KB. Under AVR-GCC toolchain I've gotten it as of this writing to 464 byes, way under the 1 kB limit.

    I will most certainly be making some more changes and improvments.

View all 2 project logs

Enjoy this project?

Share

Discussions

davedarko wrote 11/25/2016 at 22:48 point

Any idea why your hex file is shown as 1.3kB in the file section?

  Are you sure? yes | no

jaromir.sukuba wrote 11/25/2016 at 22:52 point

Because it's 1,3kB long, I guess.

  Are you sure? yes | no

davedarko wrote 11/25/2016 at 23:10 point

my guess(/vague idea) is that all the variables are stored in the SRAM part and the code is in the flash memory and everything together is in that hex, so depending on the interpretation of the rules it might be okay or not? I'm actually very confused by that and this is the reason I'm asking - sorry for the seemingly obvious question, but isn't it all part of the program anyways? You're the guy to ask imho, because of your portable programmer projects.

  Are you sure? yes | no

mcu_nerd wrote 11/25/2016 at 23:01 point

The hex file tends to be a bit larger then what's actually written to flash.  You need to use avr-size [yourhexfilename] to find out how many bytes are being written to flash.

  Are you sure? yes | no

davedarko wrote 11/25/2016 at 23:14 point

thanks. what's your thought on sram and eeprom usage? with 464 bytes you're safe anyways... :)

  Are you sure? yes | no

jaromir.sukuba wrote 11/25/2016 at 23:22 point

Consider resulting binary size to be approximately 40% of ASCII hex file size. It has a lot of overhead, as every byte is transcribed into two ASCII characters + some more characters for address, byte count, checksum and formatting.

The file is actually 1331B long, I'd try to adjust it to 1337B, just for fun.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates