IR-emitter morsekode and setup problem

Dear all

Im trying to setup af IR-emitter that makes a simple morsecode, but im stuck in both the programming and printboard setup.

im trying to make it morse . . . . - (number 4)

Can anyone help me out?

(deleted)

How do you check the output of the IR LED?

I would like a tutorial. I tried with the prefix "blink" for a LED lamp... but that didnt work. So I looked up IR on youtube, but they all had 3 legs on the emitter and mine has four. So im stucked :-/

Im totally new to this, so i can build all from the tutorials but not my own ideas :-/

Some information to start with:
http://arduino-info.wikispaces.com/IR-RemoteControl

.

Thanks Larryd.
But that one teaches how to use the IR-censor not the emitter.
My problem is to make the emitter "blink" the sequence fast-fast-fast-fast-slow-break over and over again.

Well if you have an IR diode as you said, you will need an IR receiver will you not?

.

Emil:
I would like a tutorial. I tried with the prefix "blink" for a LED lamp... but that didnt work. So I looked up IR on youtube, but they all had 3 legs on the emitter and mine has four. So im stucked :-/

IR emitters as they are used in IR remote controls are simple IR LEDs, just two legs as any other LED.

You can use red LED, greeen LED. yellow LED, IR LED, all have two legs only (anode and cathode).

When operating aLED with an Atmega, you need the LED (i.e. red, yellow, green or IR LED) and a suitable limiting resistor.

How do you want to make the morse code visible? Do you only want to send it and nobody sees anything, because IR is "invisible light"?

Hey Jurs
Yeah i want the IR to send invisible coded messages :slight_smile: so only cameras from samsung or huweii can see. (Iphones cannot detect IR light) but the two others do.

Im a science teacher, that wants my students to crack the code. But since I have no experience in using arduino, then I have to ask for help :slight_smile:

So the anode is gnd or + and the katode is A0 or D0.? cause I havnt god the faintes idea why theres two forms for anodes on it?

Actually you can see the IR light from your remote control on your webcamera :slight_smile:

found one fault... My IR-LED was damaged. So I think i got the simpel setup right... thought with a resistance at 220 it almost makes no light:-/

nvm I got it to work:

simpel setup. wire from GND to emitter. From emitter to tap 13. and the code:

inspired by Colby Newman

// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(500); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(500); // wait for a second
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(500); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(500); // wait for a second
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(500); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(500); // wait for a second
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(500); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(500); // wait for a second
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(1500); // wait for a second
}

Emil:
So the anode is gnd or + and the katode is A0 or D0.?

Anode is (positive and cathode is negative
current flows from positive to negative.

You can have differemt fcircuits for operating a LED:

Arduino OUTPUT/HIGH---limiting resistor ---- Diode---- GND

or

Arduino OUTPUT/LOW---limiting resistor ---- Diode---- 5V

iode/resistor may be exchanged

In either case, Diode direction has to be:
Anode to the 5V/HIGH side
Cathofr to the GND/LOW side.

With many LEDs, the legs are different in length:

AnOde is the LOnger leg.

And never forget the limiting resistor, or you might damage the LED diode or the Arduino!