Was something missing in the top section of the code?
It looks like you have one closing bracket too many
i removed the one just above
void setup() {
I have no AT24 to test (only AT85).
Just a shot: what happens if you change:
int output = 10;
to
volatile int output = 10;