Arduino to arduino communication using one wire, infrared

I was wondering if it was possible, utilizing the one wire library to have arduino to arduino communication. I only need one way communication (one always reading and one always writing) and would really like to replace the wire with an infrared LED and infrared detector. I only have one infrared LED and one infrared detector unfortunatrely so I don't know ther best way to achieve this. If one wire wouldn't be the best protocol for this, what good one way infrared protocols are there? I only need to transmit one 8 bit byte, I tried to achieve this simply by sending a 'ready to send' pulse of 100us and using pulse in on the other arduino, then using an if statement to see 'is pulse in between 90us and 110us?' If so, pulse in again. This time on the sending arduino, send a pulse of width dependent on the value i want to send, e.g. if i wanted to send 300, send a pulse of width 300us. This unfortunately didnt seem to work, maybe i was using pulse in wrong?


Wouldn’t the IR library be more appropriate?

If you are having troubles with your code, post it please.