Have been fooling around with the Nordic Nfr24l01 and realized that its packet size of 32bytes would be perfect for up to 32 channels of Christmas lights out in the front yard. Finding a post about interfacing vixen to an Arduino with just the serial port was the camels straw.
The concept is this:
Creating the sequence in Vixen - sending it to an inside Arduino as serial - it packets it up and sends it outside via the nrf24 to an Arduino with some ssrs for blinky Christmas display. The outside Arduino unpacks the bytes and assigns each one to "channel" which can be as simple as a relay - or as sophisticated as a phase controlled SSR for dimming.
I Googled around and found zero crossing circuit, some cheap SSRs on Ebay (~$5ea) Although I have all the parts to DIY. SSRs sound safer.
So the hardware is covered cheaply. I just don't want to reinvent the wheel and spend hours doing software if someone has already done
- A library/Sketch for Phase Control of an SSR(triac).
- Some more robust protocol for serial other than counting bytes from Vixen.
The time is short - especially if I have to wait for stuff from china.
If some kind soul could point me to advice or assistance for 1 or 2 above I would definitely appreciate it.
Otherwise it will mean writing something that uses the zero crossing to trigger the interrupt, then uses one of the counters counting microseconds comparing it to each channel value, and triggering after is passes it.
The example for the serial just sent 7 values - and counted bytes received before assigning the values to the channels. When the bytes can be any value 1-255 surrounding the bytes with an S for start and E for end just won't cut it. Kinda stumped there. The Arduino doesn't use dtr/dsr except for resetting when loading a sketch....
So there it is - still thinking and want to have a good idea of all the parts before I start coding. In the mean time I will be melting solder.