Hi there
i must have got something wrong but i can not get this code below to work it just appears dead...
I have used the blink sketch to confirm that the hardware is working (Trica).
I have also used the button sketch to confirm that the opto input is working (using a led on another pin).
I have had this working in the past so i don't no if it is something to do with my IDE?
It compiles fine.
What are your thoughts?
Thanks for any help
Joe
/*
* dimmerKnob.ino
*
* Created on: May 21, 2016
* Author: hodai
*/
#include <ACdimmer.h>
int outPin = 5; // the pin connected to the triac gate
uint8_t level;
/* zero cros detector connected to pin 2 */
ACdimmer myDimmer(outPin, AC_DIMMER_PIN_2);
void setup() {
myDimmer.begin();
}
void loop() {
level = map(analogRead(A3), 0, 1023,0,255);
myDimmer.setValue(level);
delay(50);
}