Sending RS232 commands

Good morning
I have a project to carry out and need to be able to send two rs232 commands(ASCII) to a projector to turn it on and off via two buttons connected to input pins.
I am very new to arduino but have a good understanding of other programming languages .
My question is firstly which hardware to keep it small and simple and maybe a link to an similar project for me to learn.
Many thanks in anticipation

Andrew

Any arduino, couple pushbuttons and an RS232 level converter. Possibly a phone charger as a power supply.

Look at the end of this thread and see all the related topics!

I believe you will find a close proximity to your project in the Arduino Cookbook. Best get one and go through it cover to cover and pause on any project that is interesting.

Hardware: 1 Arduino, Two jumper wires
Sketch: loopback

https://support.arduino.cc/hc/en-us/articles/360020366520-How-to-do-a-loopback-test

Many thanks for the prompt reply

Thank you

Many thanks

Many thanks

  • Most here know what you a talking about, however, there is no such thing as rs232 commands.
    RS232 is a hardware standard.

  • Consider rephrasing this in the future.

Did someone solve your problem? If so, there is a way to show gratitude...

[quote="fogmajoor, post:1, topic:1374839"]
rs232 commands(ASCII)
[/quot

  • Most here know what you a talking about, however, there is no such thing as rs232 commands.
    RS232 is a hardware standard.
  • Consider rephrasing this in the future

I said need to be able to send two rs232 commands(ASCII)

Help not criticism is the standard of forums

What is the projector type?
Do you have a datasheet?
Do you know how the commands look like?

Wrote a minimal library for an OPTOMA beamer / projector a few years ago.
It also worked with commands send over an RS232 interface.

  • We try to point users in the right direction in the forums.
    As you probably realize, the users here have varying levels of experience.
    It was not meant to be a criticism but rather education that RS232 is not related to software protocol in any way.
    RS232 defines the the hardware serial format where +3V to +15V is a binary zero and -3V to -15V is a binary one.
    DTE/DCE control signals such as RTS, CTS, DCD, and DTR are +V for true, -V for false.
  • There are no RS232 commands, ASCII or otherwise.

I will now take it as a positive and thank you for your reply

Andrew

You will need to show your understanding of your issue using common terms. Using different (incorrect) terms will lead to confusion in information.

Did you settle on hardware? Do you need more help selecting hardware? Let us know how you are progressing.

You must not consider misunderstanding of the subject as criticism. As other have pointed out, your use of terms are incorrect. I call your incorrect description "asynchronous communication" and you are asking about "RS232" which defines electrical characteristics and the physical connectors you might use, and you are probably asking about transmitting "ASCII values for data" AND "ASCII values for software flow control" unless the projector wants to use "hardware flow control" which is defined by RS232.

You say you have a projector that accepts asynchronous communications. You will need the datasheet/reference manual which will have the information needed to communicate from the host (DCE) to the terminal/projector (DTE). Provide this reference manual here.

Many thanks for your response to my incorrect description and I am humble enough at age 65 to stand corrected and moving forward I will endeavour to explain my questions in a better manner. I do become somewhat disillusioned when I see responses on forums to young up and coming software engineers being belittled for not having a certain acumen to express their needs. Going back to my original question I have written a C# program to switch on multiple Epson projectors using the PJLink protocol which works well. I have 2 different projectors that need to be controller via a RS232 cable at 9600 baud, I can achieve this via my C# program but wanted to move forward and do this with a more flexible and portable solution. I have since my original question bought a Ardunio Nano and a MAX3232 RS232 to TTL Female Serial Port Converter. It is my intention to try and achieve communication in this way.
Many thanks to the forum and I will report back on my success or failure. I did also receive a reply asking if i had found a solution and if so thanks would be polite. If you look at my responses i have tried to thank everyone that has took the time to contribute but if i have missed anyone please accept my apologies.
Kind regards
Andrew

:+1:

  • 65, youngster :slight_smile:

  • You probably know this, you can use a null modem if required.

My point was, if someone posted something you considered to be a solution to your posted need, you should flag the topic as Solved by marking their post as the solution. That's all, nothing more or less.

Wow, we have three things in common:

The same first name, the same age, and both of us have recently tangled with forum protocol police here.

As I too was criticized for not offering advice or solutions in return for advice I was seeking so let me offer you an RS232 communications tip. I do get it, nothing is free in this world.

Some devices, more often older devices, cannot accept a fire hose of RS232 commands. Therefore you may need to puts delays() between commands or risk commands being dropped. This is mostly a legacy device problem but keep it in mind if your code does not work. Try delays between commands around 10ms would be a good start and if it doesn't fix you can always remove them.

Hopefully your projector does not use hardware handshaking, I highly doubt it would. That is really a PIA.