I want to know...

I want to know how i can transmit data like hello world over the air between two arduinos using laser and photoresistor. I woul like to have it use bits so it turn the laser on and off which the second arduino can then turn back into hello world.

Why laser ?

Not sure how your photoresistor works, but it should be theoretically possible to simple use it for unidirectional serial communication. A phototransistor or photodiode may be a better choice.

It should be relatively simple to use this for half of a serial link using the standard TX/RX pins on a pair of arduinos. Our introductory EE students do a similar experiment.

-j

I wanted to use a laser for this. Does anyone have a program that cam do what i said in my first post. Thanks

This circuit might make a good starting point (might have to tweak the resistors a bit). Then you can just use the standard serial interface...no special code required. You won't be able to use a very high baud rate since phototransistors don't switch very quickly (~10us, so I'd say nothing faster than ~9600bps for safety).

Can you give me a specific link to what page you found the schematic on?

Uhh...what? It's on this page...that's it.

Yes, i know sorry i wanted a little more info on how the circuit works.

read up on the part numbers and look at the data pages. Maybe read up on photo transistors.

Ah…TxOut turns on T1 and sources about 30mA into laser LED. The detector circuit has T3 off until light is received by the phototransistor. With T3 off, the Rx input is kept near 0V by the 4.7k resistor (so don’t enable the pullup). When the phototransistor detects light, it turns on T3 which brings the Rx input high.

check this:

http://www.ohmpie.com/laserModem

As we want a digital signal here would it not be better if the SFH310 and it's 47K swapped places. In that way it would be more sensitive allowing you to take advantage of the transistor's gain.

It would be an inverting circuit then (TxOut High-->light-->SHF310 pulls low-->RxIn low). It could be made non-inverting by replacing the NPN transistor with a PNP transistor, but then it's still essentially the same circuit.

Can i use a infrared phototransistor emitter receive pair for this?

That's what we are talking about!

no, in my earlier posts i had talked About using a laser.

Can i use a infrared phototransistor emitter receive pair for this?

no, in my earlier posts i had talked About using a laser.

And a laser is ... an emitter. (It's also technically an LED) (BTW looks like your shift key is on the blink)

Just to get started… Ik it is simple code, but can someone post some code to work with the schematic.

Ummm we are talking serial here. It's Serial.print code using the SoftwareSerial library. What you make it send and receive is up to you.

http://arduino.cc/en/Reference/SoftwareSerial