can someone double check my code?

In your code in the first post you set reg and green HIGH aka ON in setup. Is this your your problem?.

Mark