I built the circuit in the attached file and it does work
here is the arduino code
#define zero 2
#define triac 3
#define pot A0
int bright;
void setup()
{
pinMode(triac, OUTPUT);
pinMode(pot, INPUT);
pinMode(zero,INPUT_PULLUP);
attachInterrupt(digitalPinToInterrupt(2), angle, RISING);
}
void loop(){
bright=map(analogRead(A0),0,1023,0,10000);
}
void angle(){
digitalWrite(triac, LOW);
delayMicroseconds(bright);
digitalWrite(triac, HIGH);
delay(1);
}