Code to transmit at 56KHz

Hello Guys I am starting at the Arduino with a lasertag project, I need a simple and clean code to transmit 56Khz via an Ir LED, I’m using an Arduino Nano with ATmega328 and want to send an integer of 8 characters ex:12345678 without coding.

Can anyone help with this?
Thank U.

Please do not cross-post. This wastes time and resources as people attempt to answer your question on multiple threads.

http://forum.arduino.cc/index.php?topic=300667

Make up your mind which language you want to ask this question is before we decide for you.

  • Moderator

[quote author=Nick Gammon date=1423971889 link=msg=2092805] Please do not cross-post. This wastes time and resources as people attempt to answer your question on multiple threads.

http://forum.arduino.cc/index.php?topic=300667

Make up your mind which language you want to ask this question is before we decide for you.

  • Moderator

[/quote]

Ok Nick, I created this because the En forum is more frequented, I will not do that anymore. Forgive me.

Zhenit: ... I'm using an Arduino Nano with ATmega328 and want to send an integer of 8 characters ex:12345678 without coding.

Can anyone help with this? Thank U.

Wait, are you saying you don't want to code it yourself and asking us to code it for you? Because that's what the last few words imply... ...unless you meant en-coding...? ...or maybe you meant 56khz signal via hardware instead of software...?

This IR comms Thread may give you a good starting point

...R

Ps991: Wait, are you saying you don't want to code it yourself and asking us to code it for you? Because that's what the last few words imply... ...unless you meant en-coding...? ...or maybe you meant 56khz signal via hardware instead of software...?

Sorry, I'm using google translator and not always the translation comes out as we wish. I needed what the friend robin2 posted, a form of pulse the output of the LED to 56khz.

Thanks for trying to help.

Robin2: This IR comms Thread may give you a good starting point

...R

Thank you friend, what you posted is great, as I studied the code and now make my changes.

Thank you very much.

Using the IRremote library:

try using .....

irsend.enableIROut(56);

to set the PWM to 56kHz, and then

irsend.mark(600);  irsend.mark(600);

to send a mark/space (i.e. turn the output on/off).

AnalysIR:
Using the IRremote library:

try using …

irsend.enableIROut(56);

to set the PWM to 56kHz, and then

irsend.mark(600);  irsend.mark(600);

to send a mark/space (i.e. turn the output on/off).

Thank you for your help.
I was studying this library and was already thinking of using it. You could give me a complete example of how to send for example “12345678”.
Again, thank you.

Why not try out all of the examples provided with the library, first.

Then you will have a better understanding of what is involved and may not need any assistance.

People on the forum are more likely to assist - when you have made some efforts yourself, but unlikely to do all of the work for you.

AnalysIR: Why not try out all of the examples provided with the library, [u]first[/u].

Then you will have a better understanding of what is involved and may not need any assistance.

People on the forum are more likely to assist - when you have made some efforts yourself, but unlikely to do all of the work for you.

I agree with that, so I studied the library for more than three hours, read every line of "IRremote.cpp", "IRremote.h" and "IRremoteInt.h" and have learned a lot, but as I am new in this area I'm still not sure about doing something alone. Comrade Your Blog is very good, I've seen a lot there that also helped me a lot. Do you think the VS1838B can be used in a LASERTAG project?

Do you think the VS1838B can be used in a LASERTAG project?

Yes, if indoors & in total darkness & only 38kHz.

For most other (=nearly all) a total waste of time and effort as per the blog article.

(So the real answer is NO)

Best to use Vishay IR receivers, something like TSOP34456 or similar 56kHz receiver, to match the frequency you need.

Its great that you have studied the libary. So when you try something and have a problem, that is a good time to post along with the code you are using.

AnalysIR: Yes, if indoors & in total darkness & only 38kHz.

For most other (=nearly all) a total waste of time and effort as per the blog article.

(So the real answer is NO)

Best to use Vishay IR receivers, something like TSOP34456 or similar 56kHz receiver, to match the frequency you need.

Its great that you have studied the libary. So when you try something and have a problem, that is a good time to post [u]along with the code you are using[/u].

All right, I'll start doing things and having difficulty asking I'll help. One more question, I was thinking to use 38Khz, you see a problem? 56Khz is best for this application? The receiver 38Khz I'm thinking of using is "Vishay TSOP4138".