Pages: [1]   Go Down
Author Topic: Arduino to arduino communication using one wire, infrared  (Read 374 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 36
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey,
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?

Cheers,
Harris
Logged

Global Moderator
Melbourne, Australia
Online Online
Brattain Member
*****
Karma: 511
Posts: 19359
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Wouldn't the IR library be more appropriate?

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

http://www.gammon.com.au/electronics

Please post technical questions on the forum - not to me by personal message. Thanks a lot.

Pages: [1]   Go Up
Jump to: