Ultrasonic Rangefinder Dimmer for ZeroCross Tail(ZCT) and PowerSSR Tail (PSSRT)

Hello there,

I have an art project by which:

My problem is that I do not have idea about coding. I am quite good at following instructions and I have managed to do some simple stuff with an Arduino, but I have no idea how to go about this.

I thought I could replace the pot from this sketch and read from the range finder instead, but I realized that it is much more than I can chew.

I would really appreciate your input, I’ve read a lot of things but they just don’t make sense to me.

I have worked the sketches separate and they worked well (I haven’t even started to think about the wireless Xbess yet). I can get reads from the range finder and the ZeroCrossTail and PowerSSR Tail work well with a potentiometer (I can dim a light)… Could any of you guide me to merge these two sketches?

The ZeroCross Tail Instruction sheet is found at http://www.powerswitchtail.com/Documents/ZeroCross%20Tail%20product%20insert%20Rev%2010-2012.pdf

and the PowerSSR Tail is found at http://www.powerswitchtail.com/Documents/PSSR%20product%20insert.pdf

Thank you so much!


TimerOne.zip (7.54 KB)

AC_Dimmer_with_pot.ino (2.96 KB)