Lego Beacon Mode code

Greetings, Merry Christmas all.

I am trying to replicate:


I have had a quick attempt based on circuit in you tube video but no luck. Will upload my code, circuit set-up and components if no one has code off hand. Seems like a few people have done it so hoping theres code that already works. Or if anyone has some sick googling skills and can find it on-line that would be lovely. I did have a look though.

The Lego IR protocal can be found:

Attached is the closest thing I have found that I used for reference but doesn’t seem to have obvious beacon mode?

PFcentral-4trains - version2.ino (11.9 KB)

Every one stop stressing figured most of it out.