Close

Ardueno land... sometime you need to walk away.

A project log for Raptor12 Wireless AC Dimmer

Christmas, Halloween light string controller that is wireless, 12channel dimmable AC controller, with an AVR for $30

kingofkyatravis-kKingOfKYA(Travis K. ) 05/09/2014 at 05:330 Comments

So if anyone else ever attempts this don't use the arduneo digital write its far too slow but easier to understand that was another sub goal of this project to make it easy for someone to adapt what i did perhaps even in a more conventional diy controller.

Anyway its a bit hard to read but this what i came up with. Komby you made this too easy i just droped you code in and it worked. I will upload to git hub after a bit more testing. https://github.com/komby/RFPixelControl

So here is the ardueno code i started with:

Pretty simple and very easy to under stand it basically take an array of data that contains the names for all the pins the loops though them turning them on or off as need. This works but its a bit too slow just this code with a static dim level hard coded i was only able to get about 127 levels of dim, that might sound ok but that also leaves me no time to do anything else like talk to the NRF radio. Also with my input being a dmx like stream from the NRF radio. aka:256 dim level i need to at least get to 256 dim  levels. Or i have no reason to finish this project, have to be better than what out there or whats the point:)

So some less readable code.

So I am basically doing the same thing as before but i am avoiding the overhead of digital write. I am talking directly to the pins of the atmega328. That leads to another complication because to write to the pins you need to update all pins attached to that port in the case of the atmeag 328 that  portB portC portD. If you google for "port manipulation arduneo" you can fine lots of help on what Ardueno pins translate to Ports, alternatively you can also just pull up the data sheets for the micro your using.

Discussions