Tell us about yourself!
Scott, To fix your code you need to insert the following lines...Before the setupLine 21 int = triacVAL = 0;In the counter == 40 testLine 54 triacVAL = digitalRead(triac);Line 64 digitalWrite(triac, triacVAL);The reason it pauses every 40 cycles, is that on the test for 40, you set the triac low to read the temp, and it never gets checked again till the next interrupt 40 cycles later. The additional code looks at the state of the triac going into the test and stores it in triacVAL, then on leaving the interrupt it resets the triac to it's previous state.I don't have the components to hand to build a test circuit, but I hope this helps.
How to make an Universal DC Motor Speed Controller
Looks like a great project, but I can't find the plastic cube light in the UK. I have tried eBay and a few other suppliers. It looks like it would have to be 3D printed.I'll have to keep my eyes open in our pound shops.Thanks for the great idea.